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/