nicest way to kill python process running on linux?
Helmut Jarausch
jarausch at igpm.rwth-aachen.de
Mon Jul 12 09:25:19 EDT 2004
Alex Hunsley wrote:
> I'm running a monitoring script under linux written in python. It's
> nohup'ed so that I can log out and it will continue running happily and
> so on, but sometimes I need to kill the script before editing the source
> and relaunching it.
> Question is, what's the nicest way to kill the python process under
> linux? Is a simple 'kill [process-id]' the nicest way to do it, or is
> there a different signal I should send it?
>
It's a matter of convention, e.g. xinetd uses the USR2 signal.
Unless you use kill -9 which can't be handled by the application
anything is fine if the user knows what signal to send and your script
catches the signal to stop gracefully.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
More information about the Python-list
mailing list