Re: killing a large lists of pids



J de Boyne Pollard wrote:

JS> Guess the reason is that typically the parent processes have
JS> lower PIDs and killing parents may take the children along

But, conversely, killing the children first would often tend to cause
the parents to exit of their own accord, if (for example) the parents
were shells executing a command pipeline.

Both of these are superficially attractive rationales. But they both
break down. In reality, process IDs are not guaranteed to be created
in _any_ order.

To add to that...even if you know that the particular system this will be
done on does indeed allocate PIDs sequentially, it still breaks down when
the maximum PID value is reached and they roll back over.

--
Kurt M. Weber
<kmw@xxxxxxxxxx>
.



Relevant Pages

  • Re: killing a large lists of pids
    ... JS> lower PIDs and killing parents may take the children along ... Sort of like typing "sync" and waiting 5 seconds before you unplug the ... power cord rather than simply unplugging the power cord without a "sync". ...
    (comp.unix.programmer)
  • Re: killing a large lists of pids
    ... JS> Guess the reason is that typically the parent processes have ... JS> lower PIDs and killing parents may take the children along ... process IDs are not guaranteed to be created ...
    (comp.unix.programmer)