diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index e9e699f4b1bd..0e862d3130ff 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1326,9 +1326,11 @@ static inline void __wake_up_parent(struct task_struct *p, | |||
1326 | /* | 1326 | /* |
1327 | * Let a parent know about the death of a child. | 1327 | * Let a parent know about the death of a child. |
1328 | * For a stopped/continued status change, use do_notify_parent_cldstop instead. | 1328 | * For a stopped/continued status change, use do_notify_parent_cldstop instead. |
1329 | * | ||
1330 | * Returns -1 if our parent ignored us and so we've switched to | ||
1331 | * self-reaping, or else @sig. | ||
1329 | */ | 1332 | */ |
1330 | 1333 | int do_notify_parent(struct task_struct *tsk, int sig) | |
1331 | void do_notify_parent(struct task_struct *tsk, int sig) | ||
1332 | { | 1334 | { |
1333 | struct siginfo info; | 1335 | struct siginfo info; |
1334 | unsigned long flags; | 1336 | unsigned long flags; |
@@ -1399,12 +1401,14 @@ void do_notify_parent(struct task_struct *tsk, int sig) | |||
1399 | */ | 1401 | */ |
1400 | tsk->exit_signal = -1; | 1402 | tsk->exit_signal = -1; |
1401 | if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) | 1403 | if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) |
1402 | sig = 0; | 1404 | sig = -1; |
1403 | } | 1405 | } |
1404 | if (valid_signal(sig) && sig > 0) | 1406 | if (valid_signal(sig) && sig > 0) |
1405 | __group_send_sig_info(sig, &info, tsk->parent); | 1407 | __group_send_sig_info(sig, &info, tsk->parent); |
1406 | __wake_up_parent(tsk, tsk->parent); | 1408 | __wake_up_parent(tsk, tsk->parent); |
1407 | spin_unlock_irqrestore(&psig->siglock, flags); | 1409 | spin_unlock_irqrestore(&psig->siglock, flags); |
1410 | |||
1411 | return sig; | ||
1408 | } | 1412 | } |
1409 | 1413 | ||
1410 | static void do_notify_parent_cldstop(struct task_struct *tsk, int why) | 1414 | static void do_notify_parent_cldstop(struct task_struct *tsk, int why) |