Update README.md
add Process.wait to example script, fix the zombie process problem
This commit is contained in:
parent
03584f60c5
commit
06601f2458
|
@ -31,9 +31,10 @@ c = LXC::Container.new('foo')
|
||||||
c.create('ubuntu') # create a container named foo with ubuntu template
|
c.create('ubuntu') # create a container named foo with ubuntu template
|
||||||
c.start
|
c.start
|
||||||
# attach to a running container
|
# attach to a running container
|
||||||
c.attach do
|
pid = c.attach do
|
||||||
LXC.run_command('ifconfig eth0')
|
LXC.run_command('ifconfig eth0')
|
||||||
end
|
end
|
||||||
|
Process.wait(pid)
|
||||||
c.stop
|
c.stop
|
||||||
c.destroy
|
c.destroy
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue