Want to monitor process..
Peter Hansen
peter at engcorp.com
Thu Feb 28 19:22:30 EST 2002
Stephen wrote:
>
> Unfortunately, my own applications seem to crash as opposed to
> shutdown normally, so it's probably not going to help me. From the
> library reference ~
> "Note: the functions registered via this module are not called when
> the program is killed by a signal, when a Python fatal internal error
> is detected, or when os._exit() is called. "
Yikes! "Crash"? Do you really mean they crash the Python interpreter,
or do you mean they exit with an exception?
If the former, you've got seriously problems, I agree.
If the latter, just wrap the highest level code with a try/finally
or try/except and put code in to ensure the child processes are
properly terminated. Simple, clean, safe.
My Python programs *never* crash (as in kill the interpreter)
but maybe that's just me... I doubt it.
-Peter
More information about the Python-list
mailing list