lkml.org 
[lkml]   [2002]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: thread groups bug?
Date
From

> When they have the same TGID, they _are_ the same thread group.

Apparently not so... Doing an execve() on the master thread breaks this
internally by removing the master thread from the thread-group ring without
resetting the TGID on all subsidiary threads. So if one of the subsidiary
threads thinks its TGID is x before an execve on the master, then if it tries
to use that TGID after the execve on the master, it will affect the master's
new thread group and not itself.

> There is absolutely _zero_ correlation between thread ID and MM. Never has
> been, never will be. An execve() is a total non-event from a TGID
> perspective.

Except that the execve() _can_ (a) change the TGID and (b) result in two
effective thread groups of the same TGID as far as the kernel is concerned.

> If you expect POSIX behaviour, you do not do execve's from the master.
> It's that simple.

My concern is not so much dealing with POSIX behaviour as coping with
behaviour that can happen without getting snookered.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:21    [W:0.043 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site