Path: utzoo!utgpu!water!watmath!clyde!rutgers!princeton!udel!gatech!mcnc!rti!xyzzy!meissner From: meissner@xyzzy.UUCP (Michael Meissner) Newsgroups: comp.unix.questions Subject: Re: wait3 emulation in SYSTEMV ?? - (nf) Message-ID: <579@xyzzy.UUCP> Date: 27 Jan 88 22:14:16 GMT References: <360@rruxa.UUCP> <4200004@pcsbst.UUCP> Reply-To: meissner@xyzzy.UUCP (Michael Meissner) Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 15 In article <4200004@pcsbst.UUCP> jh@pcsbst writes: > The newer versions of System V provide the possibilty to check > the existence of a process by sending a signal 0 to the process > in question and checking for an error return. This would allow > you to write a write a pseudo wait3() function for terminated > processes: While this scheme will work 99.9999999% of the time, there is a small hole -- the process could die, and it's terminatation would be available, and subsequent to that, the system could reuse the process ID. If you were superuser, you would not get back the error return that the pid isn't yours. Granted, it takes awhile for the system to reuse pids (about 30,000 generally). -- Michael Meissner, Data General. Uucp: ...!mcnc!rti!xyzzy!meissner Arpa/Csnet: meissner@dg-rtp.DG.COM