Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] restore ->pdeath_signal behaviour

Commit b2b2cbc4b2a2f389442549399a993a8306420baf introduced a user-
visible change: ->pdeath_signal is sent only when the entire thread
group exits.

While this change is imho good, it may break things. So restore the
old behaviour for now.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
To: Albert Cahalan <acahalan@gmail.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Qi Yong <qiyong@fc-cn.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Oleg Nesterov and committed by
Linus Torvalds
241ceee0 9d572ecb

+4 -4
+4 -4
kernel/exit.c
··· 597 597 static void 598 598 reparent_thread(struct task_struct *p, struct task_struct *father, int traced) 599 599 { 600 + if (p->pdeath_signal) 601 + /* We already hold the tasklist_lock here. */ 602 + group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p); 603 + 600 604 /* Move the child from its dying parent to the new one. */ 601 605 if (unlikely(traced)) { 602 606 /* Preserve ptrace links if someone else is tracing this child. */ ··· 635 631 /* We don't want people slaying init. */ 636 632 if (p->exit_signal != -1) 637 633 p->exit_signal = SIGCHLD; 638 - 639 - if (p->pdeath_signal) 640 - /* We already hold the tasklist_lock here. */ 641 - group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p); 642 634 643 635 /* If we'd notified the old parent about this child's death, 644 636 * also notify the new parent.