From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] waitpid() From: Fco.J.Ballesteros In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 16 Apr 2004 10:54:38 +0200 Topicbox-Message-UUID: 5d151728-eacd-11e9-9e20-41e7f4b1d025 > Posix waitpid() seemingly can select the PID to wait for. Unlike P9 > waitpid(2) which merely returns the PID. My question is, what does posix say regarding the pids you don't want. I mean, does it say something like "when waitpid finds an unwanted pid it guarantees that such information is not dropped" or the opposite, or just nothing about. Perhaps rsc knows. Regarding what should be done, I think that all waitpid() variants should be dropped. The regular wait one is the one that should be there IMHO. If you just happen to be looking for a particular pid, then put your wait() in a lopp. If you also happen to want to keep the unwanted ones around (should you want to wait for them in the future), record them in a list. The plan9 waitpid is a convenience for the case when you look for a pid but don't care about others. Thus, I wouldn't vote for changing the native interface; I'd just change ape, but only if posix says so. Otherwise I'd fix the program using ape.