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 07:33:22PM -0700, Linus Torvalds wrote:
    > In article <20000827175449.A7759@hq.fsmlabs.com>,
    > <yodaiken@fsmlabs.com> wrote:
    > >
    > >In the POSIX spec fork demolishes all threads in the child. This is the
    > >only sensible answer and it seems wasteful to ignore the rare sensible
    > >parts of the POSIX spec.
    >
    > What?

    I said it poorly. In the POSIX spec, the child is born single threaded.
    To quote:

    16) A process is created with a single thread. If a multithreaded process
    calls fork(), the new process shall contain a replica of the calling
    thread and its entire address space, possibly including the states of
    mutexes and other resources. Consequently, to avoid errors,
    the child process may only execute async-signal safe operations
    (see 3.3.1.3) until such time as one of the exec functions is called.
    If {_POSIX_THREADS} is defined, fork handlers may be established
    by means of the pthread_atfork() function in order to maintain
    qpplication invariants across fork() calls.

    -
    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:5.170 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site