Re: proc fs and shared pids

Lex Spoon (sspoon@clemson.edu)
Wed, 31 Jul 1996 19:55:37 -0400 (EDT)


Allowing threads to share pid's means we have to go through and rethink
what a lot of things mean. Do kill() and waitpid() operate on just
one thread or all of them? People are going to sometimes want each
of these cases, so we have to expand kill() and waitpid() to deal
with it.

Unix already has a way of dealing with a group of cooperating processes:
process groups. Why not just use this concept for threads, too? If you
want to kill all the threads in certain process group 37, you do
kill(-37, SIGWHATEVER).

I CAN see possible uses for wanting to address a "group of threads
sharing the same memory mappings". But most often, aren't processes and
process groups just what most people want?

Lex

David Schwartz wrote:
>
>
> There really isn't a reason for two processes to share a pid but
> there are reasons for all the threads of a process to have the same pid.
> Primarily because this is what makes sense for things like kill() and
> waitpid().
>
> DS
>
> On Tue, 30 Jul 1996, Lex Spoon wrote:
>
> > And /proc is not the only problem! What about kill()? waitpid()?
> >
> > It's NICE to be able to identify a process by just knowing its pid;
> > are there any real uses for two processes having the same pid?
> >
> >
> > Lex
> >
> >
>
>