CatchChild();
*before* we fork the domain child. This call establishes a signal handler that
eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon
SIGCLD handler should do. This causes the parent to ignore dead children and
time out, instead of calling winbind_child_died() on receipt of the signal. The
correct fix is to move the CatchChild call into the child code after the fork.
Jeremy.
ZERO_STRUCT(state);
state.pid = sys_getpid();
- /* Stop zombies */
- CatchChild();
-
/* Ensure we don't process messages whilst we're
changing the disposition for the child. */
message_block();
/* Child */
+ /* Stop zombies in children */
+ CatchChild();
+
state.sock = fdpair[0];
close(fdpair[1]);