s4-process_standard: Remove signal(SIGCHLD, SIG_IGN)
authorAndrew Bartlett <abartlet@samba.org>
Wed, 18 Feb 2015 23:45:31 +0000 (12:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 17 Mar 2015 03:29:06 +0000 (04:29 +0100)
commit30e0238646bc3a891a67dea57baccea8afc1af43
treeb08ff031ae71baea9b369d739bb4cdb96991bc66
parentf212143abc58c896eb406c1356715b78a52ab97b
s4-process_standard: Remove signal(SIGCHLD, SIG_IGN)

We replace this with a pipe between parent and child, and then watch
for a read event in the parent to indicate that the child has gone away.

The removal of signal(SIGCHLD, SIG_IGN) requires us to then call
waitpid().  We can't do that in a main loop as we want to get the exit
status to the legitimate waitpid calls in routines like
samba_runcmd_*().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/smbd/process_standard.c