[buug] checking a pid

Will Lowe harpo at thebackrow.net
Wed Feb 26 21:11:54 PST 2003

> Well, I need this in a C program, not as something I type into the
> shell.  Setting up that full pipeline wouldn't be completely trivial.

 From "man 2 kill":

       #include <sys/types.h>
       #include <signal.h>

       int kill(pid_t pid, int sig);


       If  sig  is 0, then no signal is sent, but error checking is still per-

... so basically, if you kill(pid, 0) and it doesn't return an error,
pid is still running.


More information about the buug mailing list