tracehook: fix SA_NOCLDWAIT

I outwitted myself again in commit 2b2a1ff64afbadac842bbc58c5166962cf4f7664,
and broke the SA_NOCLDWAIT behavior so it leaks zombies. This fixes it.

Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Roland McGrath <roland@redhat.com>

+3 -2
+3 -2
kernel/signal.c
··· 1338 struct siginfo info; 1339 unsigned long flags; 1340 struct sighand_struct *psig; 1341 1342 BUG_ON(sig == -1); 1343 ··· 1403 * is implementation-defined: we do (if you don't want 1404 * it, just use SIG_IGN instead). 1405 */ 1406 - tsk->exit_signal = -1; 1407 if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) 1408 sig = -1; 1409 } ··· 1412 __wake_up_parent(tsk, tsk->parent); 1413 spin_unlock_irqrestore(&psig->siglock, flags); 1414 1415 - return sig; 1416 } 1417 1418 static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
··· 1338 struct siginfo info; 1339 unsigned long flags; 1340 struct sighand_struct *psig; 1341 + int ret = sig; 1342 1343 BUG_ON(sig == -1); 1344 ··· 1402 * is implementation-defined: we do (if you don't want 1403 * it, just use SIG_IGN instead). 1404 */ 1405 + ret = tsk->exit_signal = -1; 1406 if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) 1407 sig = -1; 1408 } ··· 1411 __wake_up_parent(tsk, tsk->parent); 1412 spin_unlock_irqrestore(&psig->siglock, flags); 1413 1414 + return ret; 1415 } 1416 1417 static void do_notify_parent_cldstop(struct task_struct *tsk, int why)