[buug] checking a pid

Ian Zimmerman itz at speakeasy.org
Wed Feb 26 17:06:17 PST 2003

How does one check in general if a number is a pid of a living
process, under BSD?  The old saw kill(pid, 0) only works for my own
processes - it will fail for other users' processes whether or not pid
is alive.

Under Linux, I solved this by stat'ing /proc/<pid>/ .
What is the BSD way?

Ian Zimmerman, Oakland, California, U.S.A. 
if (sizeof(signed) > sizeof(unsigned) + 4) { delete this; }
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087

More information about the buug mailing list