lkml.org 
[lkml]   [2000]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SCO: "thread creation is about a thousand times faster than on
Date
From: "David Howells" <David.Howells@nexor.co.uk>
>
> Would it be possible to make fork() or clone() from a process whose
tgid!=pid
> reparent the child to the thread group leader automatically? Thus, when
the
> creating thread goes away, the child is still a child of the "process",
and
> SIGCHLD is still going to go to the process (leader thread).
>
No need--- it's userspace-solvable; we just need a rule that says
"fork() in a thread is actually a clone(...|CLONE_PARENT,...)"
and the magic happens all by itself.

> Also all child "processes" and "threads" are then logically children of
the
> "process", given that a "process" is then defined by the tgid.
>
> Also my 2p on the execve() problem: if the master thread does an execve(),
> there must be a point of no return, at which point all the child threads
> should be deleted, IMHO, otherwise they turn into full processes in their
own
> right, and the thread-signalling framework goes out the window.
>
> And for a further thought on the subject, is it possible for when a child
> thread does an execve(), to wangle the master thread into making this
call,
> with all other threads SIGSTOP'd until completion (& death) or failure (&
> resumption)? (though that's probably better done in userspace)

Exactly. Userspace is the key. (We just probably need a 'parent has
exec()ed' notification signal in the children, like the current 'parent has
exit()ed' one).

-az


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