wait4() and waitid() block until a state change in the calling process.
In the case of termination, the wait syscall reaps the child. For more
info see wait(2).
This patch implements support for process termination (exit / kill) and
does not implement other state changes like stop and continue.