Closed pda closed 10 years ago
Oh, right…
finally:
if args.kill_all_on_exit:
kill_all_processes(KILL_ALL_PROCESSES_TIMEOUT)
def kill_all_processes(time_limit):
info("Killing all processes...")
try:
os.kill(-1, signal.SIGTERM)
That'd do it :)
It's possible that my_init
should only kill its own child / descendant processes. But in the normal use-case, that's the entire system, so perhaps there's no need to add that complexity.
Yes. Don't run my_init except in a container. It's specifically designed for use in a Docker container.
I tend to test my_init like this:
docker run -t -i -v `pwd`/image:/image phusion/baseimage:xxx /image/my_init [...]
Makes sense :)
Running
my_init
on Mac OS 10.9.2 crashes the entire system, dumping it to a blank grey screen and requiring a reboot.Warning, by the nature of this issue, running the examples may crash your system.
This first happened when I invoked
my_init
from Mac OS to test exit status fixes for #45:A simpler and more universal test-case:
I get the same crash with:
/usr/bin/python
/usr/local/bin/python
I realize Mac OS isn't the target system for this program, but it'd be nice to be able to test e.g. exit status bugs on any python-capable system, and the crash is very strange.