Handle errno=EINTR from waitpid()
Added non-blocking wait
Typo