View Single Post
Old 2010-04-15, 20:45   #2
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by odin View Post
Hello All,

If I have mprime launched by an init script under Ubuntu linux at start up what is the best way to stop the program gracefully? I don't just want to terminate the processes but to have it stop all workers and do a file dump like it normally does and then quit.


Is it:

kill -HUP $PID

or

kill -KILL $PID


What would this do:

killall mprime

Would it stop mprime gracefully or would it do a hard terminate?

Thanks.
kill -HUP $PID, kill -INT $PID, kill -TERM $PID, and Ctrl-C all terminate the program gracefully. killall/pkill gives a SIGINT, so it would do so as well.

Sending a SIGKILL, on the other hand, would hard terminate the program and not let it save its progress since the last automatic checkpoint.
mdettweiler is offline   Reply With Quote