Re: [Exim] What to do about non-monitonic process ids

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tony Finch
Date:  
À: exim-users
Sujet: Re: [Exim] What to do about non-monitonic process ids
On the topic of pids, I note that the BSDs have pids up to 99999
rather than 65535 -- they've kept to five digits to avoid changing
the field width in the output of ps etc. I don't know of any unices
that have widened them.


Nico Erfurth <masta@???> wrote:
>
>And whoever came up with random PIDs should be shot and buried on a moon
>far far away ;)


I once almost shot myself in the foot when testing code on a live service
machine as root. (How foolish can you be?) There was a bug, of course,
which caused the program to fork and the parent to die, in a fairly
quick loop. I killed the program without having to reboot the machine
by writing a program that kills pids n...n+5 or so in a tight loop
and pointing it at a pid some small amount greater than the current
pid of my broken program. Killing only one pid wasn't reliable enough
owing to context switching and scheduling etc.

Random pids would have been my doom, of course.

Tony.
--
f.a.n.finch <dot@???> http://dotat.at/
SHETLAND ISLES: NORTHWEST 4 OR 5 INCREASING SOUTHWEST 6 OR 7 BEFORE VEERING
NORTHWEST 5 OR 6 LATER. RAIN SPREADING IN, CLEARING TO SCATTERED SHOWERS
LATER. GOOD TO MODERATE. ROUGH TO VERY ROUGH.