Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!wiley!news From: doug@ridley.coyote.trw.com (Doug Rudoff) Newsgroups: comp.unix.questions Subject: How to tell if a process exists Message-ID: <26B867F8.38BB@wilbur.coyote.trw.com> Date: 2 Aug 90 17:50:47 GMT Sender: news@wilbur.coyote.trw.com (News Software) Reply-To: rudoff@mdi.com Organization: Mobile Data International Lines: 19 In a C program, how do you tell if a certain process exists? A kill(0,pid) works only if you own the process (or you're root). It seems like such a simple thing to request that it should be part of the standard C libraries for unix, but I can't seem to find the right thing to use. The reason I need this is that I have a user interface that depends on another prcoess to exist to run properly. The other process writes its process id to a file and then I want the user interface to check to see if that process id is still there. Is there a better way to do this? I'm running Ultrix 3.1D on a DECstation 3100. -- =-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Doug Rudoff Mobile Data International Bothell, WA (206) 487-5937 rudoff@mdi.com, uunet!mdisea!rudoff =-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-