Phantom CPU gobbler?!

Chris Elvin celvin at EE.Surrey.Ac.UK
Tue Jul 3 19:29:52 AEST 1990


In article <960004 at teecs.UUCP> belkin at teecs.UUCP (Hershel Belkin) writes:
>I have what appears to me to be a strange situation which occasionally
>occurs on my system.  If anyone can shed some light on what may be
>happenning, I'd appreciate some e-mail! ...
>
>Every so often I fins a shell process (sh or ksh) which has somehow
>become dis-associated with its logon session.  By this I mean that
>the shell's PPID is "1", and the user is no longer logged on.

My guess is that the user has written a shell script which he/she kick off
as a background job.  The script is a loop so never terminates.

When the user logs off, the script is not killed, but its PPID is changed
to 1 because its parent (the user's login shell) dies. This is the case
for SUNOS 4.0.3 and I suspect that its pretty general for all dialects
of *NIX

I have experienced such scripts by users checking every 5 seconds whether
their 'friends' are logged in.  I positively discourage this sort of script
and show the users how to kill the script automatically on logout and
to leave a longer 'sleep time' in the loop.

		Hope this helps

		Chris

-- 
Chris Elvin
C.Elvin at EE.Surrey.Ac.UK        "what happens if I press this big red button"
Dept of Elec. Eng, University of Surrey, Guildford, Surrey, GU2 5XH. England



More information about the Comp.unix.wizards mailing list