I knew that sys.exit() raises an Exit exception, so when I run this I knew it wouldn't exit:
In [25]: try:
....: sys.exit()
....: except:
....: print "oops"
....:
oops
But I thought that os._exit() was meant to exit using a C call, but it's also causing an exception:
In [28]: try:
....: os._exit()
....: except:
....: print "oops"
....:
oops
Is there a way of doing this without killing the PID?
exceptwithout a specific exception.