wait() on a PID that is not your child
wait() on a PID that is not your child
Posted Oct 8, 2011 1:33 UTC (Sat) by HelloWorld (guest, #56129)In reply to: wait() on a PID that is not your child by Richard_J_Neill
Parent article: A Plumber's Wish List for Linux
That is inherently racy. In order to do that, you first need to find out about the relevant process's PID, and then start waiting for it. But when you start waiting, the process may already have exited, and a new process might have its PID now, so you may end up waiting for another process than the one you intended. In order to fix this, larger PIDs would be necessary, so that every new process gets a PID that was never used before.
