lkml.org 
[lkml]   [2000]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SCO: "thread creation is about a thousand times faster than on
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/

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