Process Group ID's (was: Re: pid rollover?)
John F. Haugh II
jfh at rpp386.Dallas.TX.US
Wed Feb 8 16:58:59 AEST 1989
In article <763 at necisa.necisa.oz> boyd at necisa.necisa.oz (Boyd Roberts) writes:
>In article <12118 at rpp386.Dallas.TX.US> jfh at rpp386.Dallas.TX.US (John F. Haugh II) writes:
>> for (pp = proc;pp < v.ve_proc;pp++)
>> if (pp->p_stat && pp->p_pid == mpid) /* oops, exists */
>> goto again;
>
>Guess again, bozo. You've also got to check for p->p_pgrp clashes.
>You can't have mpid == an active process group id.
I may be wrong - I checked using the `compile a program and see how it
behaves' school of UNIX behaviour determination - but you can't have an
active process group if the process group leader is dead.
Or did I miss something?
% crash
> proc 16
SLT ST PID PPID PGRP UID EUID PRI CPU EVENT NAME FLAGS
16 s 9378 1 0 0 0 39 0 6000000 hang incore text
That was a member of a process group which was exited from. The program
lingered because it was ignoring the SIGHUP it was sent. As you can see,
the process group is now zero.
Before I spend too many more hours trying to figure out the circumstance
under which the process group would not be reset to zero, does anyone
know of one?
--
John F. Haugh II +--Quote of the Week:------------------
VoiceNet: (214) 250-3311 Data: -6272 | "Get it through your head:
InterNet: jfh at rpp386.Dallas.TX.US | CARS ARE THE ENEMY."
UucpNet : <backbone>!killer!rpp386!jfh +------ -- Bob Fishell ----------
More information about the Comp.unix.wizards
mailing list