On 2003.10.26 21:03, MJ Ray wrote:
I normally use -3 or -QUIT in between a TERM and KILL. Is there any justification for doing so, or am I just repeating old Unix folklore?
If core dumps haven't been disabled via ulimit, SIGQUIT has the side effect of creating a core dump of the program being killed. If you want a backtrace because you're the developer or you intend to submit a bug report this could be very useful.
If this is indeed what you want to do you can reset the ulimit to allow core files first, then send the SIGQUIT:
ulimit -c 102400 # 100Mb (or ulimit -c unlimited) kill -QUIT <pid>
The other thing about SIGQUIT is that it can often be generated from the keyboard so when your program doesn't respond to ^C (SIGINT) you can type ^\ to send it SIGQUIT.
Finally, shells tend to ignore SIGTERM and SIGHUP can usually be used to kill them rather than resorting straight for SIGKILL.