home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:4458 comp.unix.wizards:3701
- Path: sparky!uunet!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!ravikm
- From: ravikm@austin.ibm.com (Ravi K Mandava)
- Newsgroups: comp.unix.programmer,comp.unix.wizards
- Subject: Re: detecting process death from unrelated process
- Message-ID: <1992Aug26.194612.25105@awdprime.austin.ibm.com>
- Date: 26 Aug 92 19:46:12 GMT
- References: <1992Aug25.225021.22386@atlastele.com>
- Sender: news@awdprime.austin.ibm.com (USENET News)
- Reply-To: piobe!ravikm@ibmpa.awdpa.ibm.com
- Organization: IBM Austin
- Lines: 14
- Originator: ravikm@piobe.austin.ibm.com
-
-
- In article <1992Aug25.225021.22386@atlastele.com>, gerald@atlastele.com (Gerald Aden) writes:
- > Is there a way for process A to detect that process B has exited where
- > process A has the pid of process B but is not the parent of process B?
-
- To find out if a process is alive or not, use kill(pid_t procid, int
- signal) call with 0 signal. If the call returns -1 and errno is set
- to ESRCH, then the process is not alive. Else, it is alive.
-
- Hope this helps,
- --
- *******************************************************************************
- Ravi K Mandava email: piobe!ravikm@ibmpa.awdpa.ibm.com
- *******************************************************************************
-