mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
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.
This commit is contained in:
parent
15857534b7
commit
8d701a142b
@ -982,9 +982,6 @@ static bool fork_domain_child(struct winbindd_child *child)
|
||||
ZERO_STRUCT(state);
|
||||
state.pid = sys_getpid();
|
||||
|
||||
/* Stop zombies */
|
||||
CatchChild();
|
||||
|
||||
child->pid = sys_fork();
|
||||
|
||||
if (child->pid == -1) {
|
||||
@ -1006,6 +1003,9 @@ static bool fork_domain_child(struct winbindd_child *child)
|
||||
|
||||
/* Child */
|
||||
|
||||
/* Stop zombies in children */
|
||||
CatchChild();
|
||||
|
||||
state.sock = fdpair[0];
|
||||
close(fdpair[1]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user