Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Ubuntu Apache server with some very weird problems, and as an intermediate solution, I need to write a script that kills off worker processes.

The problem is that a worker process (mpm_worker) occasionally gets stuck and won't even respond to kill anymore. I have to use kill -9. So, the question is, is there some test signal I can send to test if a process responds? kill -0 won't work; the PID exists, so it will exit with status 0.

I know after using kill that it won't respond, but I can't very well use that as test :)

share|improve this question
You can issue a kill -15 and check if the process is still alive after n seconds. If it's still alive kill -9. – Bart May 14 '13 at 8:54
That won't work, because I don't want to kill the process if it's still functioning... – Halfgaar May 14 '13 at 12:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.