Re: proc fs and shared pids (fwd)

Jim Nance (Jim_Nance@avanticorp.com)
Wed, 7 Aug 1996 10:32:46 -0400 (EDT)


I dont want to get into a debate with either Al or Linus. I am responding
ONLY because this posting brings up some questions I have been wanting to ask.

Forwarded message:
> From: Linus Torvalds <torvalds@cs.helsinki.fi>
> To: Al Longyear <longyear@netcom.com>
> Subject: Re: proc fs and shared pids

> On Tue, 6 Aug 1996, Al Longyear wrote:
> > [Microsoft] did not support threads in their POSIX implementation of
> > Windows NT for several reasons.

Probably because they dont want to encourage people to write code that can
be ported off NT machines. (Thats not a question, just my editorial comment).

> - quite naturally, a terminal signal kills only the task that got the
> signal.

One problem I have always had writting multiprocess programs is how to ensure
that they all die when someone tries to kill the program, especially if
someone sends a kill -9 to a subprocess while the parrent is waiting to read
a file from a crashed NFS server or something. Is it possible to ensure
that if any process dies, the entire group dies? I know this happens if
you kill the process group leader, but sometimes people kill its children.
If it is not currently possible to do this, can clone() take a flag to
tell it that the processes want to share termination?

> The "clone()" approach, on the other hand, makes threads first-class objects.
> That's _real_ threading, as opposed to the thread/process limited threading.

Many people advocate building threads in user space on top of light weight
processes, where several threads could share an LWP. Are you advocating
building user space threads on top of clone()d processes, where multiple
user space threads could share a process, or do you want to see a model where
each user space thread gets exclusive use of exactly 1 clone()d process?

Jim