lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] copy_process: fix CLONE_PARENT && ->exit_signal interaction
On 02/25, Linus Torvalds wrote:
>
> > As I think I said before, I don't really know what the actual use case is
> > for CLONE_PARENT without CLONE_THREAD. So it's easy to approve changing
> > its behavior, but I do vaguely worry about who expected what behavior before.
>
> I think changing it is wrong.

Perhaps. As I said, I don't know what is the expected behaviour. And in fact
I can't think of the "obviously good" behaviour.

> I can easily see somebody using CLONE_PARENT to get the correct getppid
> semantics in the thread, and then setting the signal to zero to not make
> the parent see the thread go away.

->exit_signal == 0 doesn't mean the thread silently goes away, it becomes
a zombie (even if ->parent ignores SIGCHLD). We don't send the signal, but
that is all.

And if ->parent execs, we reset ->exit_signal to SIGCHLD anyway.

> So at the very least it should accept zero for "no signal".

perhaps. I don't know. But I am not sure this is always right.

> And quite
> frankly, it would be good to try to see if there are other alternatives.

Agreed. I thought about checking ->xxx_exec_id's in copy_process(),
but doesn't look very nice...


(can't resist... hopefully now it is clear this should have beeen discussed
outside of the closed lists from the very beginning ;)

Oleg.



\
 
 \ /
  Last update: 2009-02-25 22:27    [W:2.572 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site