For child processes, the wait() and waitpid() functions can be used to suspends execution of the current process until a child has exited. But t
wait()
waitpid()
Maybe it could be possible to wait for /proc/[pid] or /proc/[pid]/[something] to disappear?
There are poll() and other file event waiting functions, maybe that could help?