Sort headers
Constify long options
Remove useless call to sigemptyset
properly check errno when waiting for a process status when a SIGCHLD is received
White space fixes