public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Filipe Brandenburger <filbranden@gmail.com>
Cc: Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] prctl: pdeath_signal sent when parent thread (instead of parent process) dies
Date: Fri, 1 Jun 2012 21:02:30 +0200	[thread overview]
Message-ID: <20120601190230.GA405@redhat.com> (raw)
In-Reply-To: <1338332348-3469-1-git-send-email-filbranden@gmail.com>

On 05/29, Filipe Brandenburger wrote:
>
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -806,7 +806,8 @@ static void forget_original_parent(struct task_struct *father)
>  				BUG_ON(t->ptrace);
>  				t->parent = t->real_parent;
>  			}
> -			if (t->pdeath_signal)
> +			if (t->pdeath_signal &&
> +			    !same_thread_group(father, reaper))
>  				group_send_sig_info(t->pdeath_signal,
>  						    SEND_SIG_NOINFO, t);
>  		} while_each_thread(p, t);

Filipe, you can't even imagine how much do I like this change
personally ;) Although I think that pdeath_signal code should
be moved into reparent_leader(). I suggested this many times.

But I was told there are users which depend on current behaviour,
they really want to know when the parent _thread_ exits.

Why? I have no idea. And I agree this is ugly, but we can't
break user-space.

Oleg.


  reply	other threads:[~2012-06-01 19:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 22:59 [PATCH 1/1] prctl: pdeath_signal sent when parent thread (instead of parent process) dies Filipe Brandenburger
2012-06-01 19:02 ` Oleg Nesterov [this message]
2012-06-01 20:00   ` Filipe Brandenburger
2012-06-04 16:15     ` Oleg Nesterov
2012-06-12  1:28 ` [PATCHv2 0/1] prctl: move pdeath_signal from task_struct to signal_struct Filipe Brandenburger
2012-06-12  1:28 ` [PATCHv2 1/1] " Filipe Brandenburger
2012-06-12 16:19   ` Oleg Nesterov
2012-06-13 15:46     ` Albert Cahalan
2012-06-15  3:57       ` Filipe Brandenburger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120601190230.GA405@redhat.com \
    --to=oleg@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=filbranden@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox