Add command_manager_start(), encaps sigchild(): FIX Gavin Troy..
Gavin Troy reported on s-nail-users@ that using a pipe hook
results in a hang -- the reason was that in the ongoing effort to
clean the codebase the return values of system calls have (almost
all now hopefully) been changed from <0 to ==-1, but if that is
done in a braindead way, then something important may get lost.
In this case it was the fact that waitpid(2) may well report 0,
but especially with WNOHANG.
Instead of only fixing the return value issue, encapsulate child
process handling some more by internalizing sigchild() and instead
offering a command_manager_start() that is called from main.c
during startup. Set SA_NOCLDSTOP if available to avoid useless
calls to the signal handler. In theory we could drop WNOHANG, but
i'm afraid of doing so today. Let's wait until some future time,
when all this is revisited.