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
> >
> >
>
>