On Sun, Aug 27, 2000 at 05:25:07PM -0700, Linus Torvalds wrote:
> In article <20000827051241.A24890@hq.fsmlabs.com>,
> <yodaiken@fsmlabs.com> wrote:
> >
> >POSIX says nothing, as far as I can tell, about the effect of exec on
> >threads. However, it does say pending signals must be inherited. It's
> >unclear what should happen in Linux, but it might be good for the new
> >process to still be a thread in the thread group -- although it won't
> >be sharing memory anymore.
>
> No. Simply for security purposes we _definitely_ need to "de-thread" the
> process when it does an exec. Otherwise we have "interesting" issues
> with suid execs that are part of a non-suid thread group.
I came to the same conclusion, but ..
> Note that for _pthreads_ this kind of exec is illegal anyway. Silly
> POSIX threads standard had to take user-level threading models into
> account, so under POSIX threads an execve() needs to kill off all other
> threads.
Does it? I looked in the spec, but didn't see it. That's stupid -- and
note similarly that it is easy for Linux fork to conform to POSIX spec that
the forked (new) process has no threads.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:20 EST