Re: SCO: "thread creation is about a thousand times faster than on

From: Albert D. Cahalan (
Date: Mon Aug 28 2000 - 19:36:17 EST

Alan Cox writes:
> [somebody]

>> 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. I think exec
>> should do the same thing: calling thread should die and be
>> replaced by a thread/process that is not in the thread group
>> since it no longer shares memory.
> It isnt a sensible answer. Think about a threaded web server
> firing off cgi scripts. You should probably kill those with
> the same mm. Especially if you have an unclone(CLONE_MM) since
> you can then unshare the VM for a thread and exec stuff off it

The clean answer is useless: change the VM, which is shared,
letting all the other threads crash. (they get SIGSEGV if they
run during the exec call, otherwise they run the new code at
some fairly random address)

So there are multiple sensible answers...

a. The shared VM changes. If it hurts, don't do that. No bloat here.
b. All other threads get killed. This is POSIX-friendly.
c. Force an unclone(~0) to go with the exec. Can do setuid CGI.

Doing unclone(CLONE_MM) is lame. Unclone all or none.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:22 EST