Is there any way to use the wait() system call with a timeout, besides using a busy-waiting or busy-sleeping loop?
wait()
I\'ve got a parent process that
You can use waitpid together with the WNOHANG option and a sleep.
waitpid
WNOHANG
while(waitpid(pid, &status, WNOHANG) == 0) { sleep(1); }
But this will be an active sleeping. However I see no other way using the wait type of functions.
wait