All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Morin <guillaume@morinfr.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	matt.helsley@gmail.com, davem@davemloft.net,
	guillaume@morinfr.org
Subject: Re: + exitc-call-proc_exit_connector-after-exit_state-is-set.patch added to -mm tree
Date: Thu, 27 Feb 2014 19:26:09 +0100	[thread overview]
Message-ID: <20140227182609.GA26307@bender.morinfr.org> (raw)
In-Reply-To: <20140227164750.GC909@redhat.com>

On 27 Feb 17:47, Oleg Nesterov wrote:
> Anyway, I only tried to say that "a small window between when the event
> is delivered and the child become wait()-able." is not closed by this
> patch. Sorry for not being clear enough.

Ok, thanks for it making it clear.

> Nevermind. Please consider this trivial example:
> 
> 	tfunc(void *)
> 	{
> 		for (;;)
> 			pause();
> 	}
> 
> 	int main(void)
> 	{
> 		pthread_create(tfunc);
> 		pthread_exit();
> 	}
> 
> The main thread can exit and call proc_exit_connector() before
> register_interest_for_pid(), but WNOHANG obviously can't succeed.
 
What matters is not the exit message of the main thread but the exit
message from the last threaded dying.  In your example, it's fine that
waitpid fails since the process is still around.  If you kill it, the
connector will get a connector message for the thread you created in
main().

> But let me repeat just in case: I am not arguing with this change.

That was my understanding from my message.  But I wanted to respond to
make sure I understood your points correctly.

Thanks for your help.  I appreciate it.

Guillaume.

-- 
Guillaume Morin <guillaume@morinfr.org>

  reply	other threads:[~2014-02-27 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 21:53 + exitc-call-proc_exit_connector-after-exit_state-is-set.patch added to -mm tree akpm
2014-02-25 15:10 ` Oleg Nesterov
2014-02-27 14:48   ` Guillaume Morin
2014-02-27 16:47     ` Oleg Nesterov
2014-02-27 18:26       ` Guillaume Morin [this message]
2014-02-27 19:06         ` Oleg Nesterov

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=20140227182609.GA26307@bender.morinfr.org \
    --to=guillaume@morinfr.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.helsley@gmail.com \
    --cc=oleg@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.