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 see from many place the follow command is used to check if a process exists, e.g.

killall -0 nginx

But from the documentation I can't see anything related to this argument, can anyone explain?

share|improve this question
up vote 7 down vote accepted

man kill

If sig is 0, then no signal is sent, but error checking is still performed; this can be used to check for the existence of a process ID or process group ID.

killall kill processes by name instead of PID on Linux & BSD-based systems. In other Operating Systems (Solaris), the killall command is used to terminate all running processes.

share|improve this answer
3  
Note: killall kills processes by name on Linux and BSD platforms. On other platforms (notable Solaris) is kills all processes (ie stops the server). – Chris S Oct 10 '12 at 13:31

I believe this article: http://www.linuxjournal.com/article/1332 will explain the whole subject.

share|improve this answer
1  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – kasperd Jan 19 at 14:04

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.