[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140227182609.GA26307@bender.morinfr.org>
Date: Thu, 27 Feb 2014 19:26:09 +0100
From: Guillaume Morin <guillaume@...infr.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
matt.helsley@...il.com, davem@...emloft.net, guillaume@...infr.org
Subject: Re: + exitc-call-proc_exit_connector-after-exit_state-is-set.patch
added to -mm tree
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@...infr.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists