Trouble killing processes in SysV/AT

wtr at moss.ATT.COM wtr at moss.ATT.COM
Fri Apr 29 22:48:59 AEST 1988


In article <3951 at killer.UUCP> wnp at killer.UUCP (Wolf Paul) writes:
>Can anyone enlighten me as to what causes a process to become "immortal"
>in System VR2,  or Microport UNIX System V/AT, to be more specific?

basically the way i do it is to have a shell script that runs 
something in the background.  when the shell script puts the
process in the backgroun and goes about it's merry own way,
(which usually means exiting back out), the background
process spawned from the script is given the PPID of 1
because it's former parent is now dead.

i've used this to great advantage when i want to run a background
job from a terminal, and then logoff and go somewhere else.
(yes, I know about nohup, it's priority is too low, and i need
to route my standard output, this ways easier)

>I have encountered this a number of times, where it would be impossible
>even for root to kill a process; if the parent process of the "immortal"
>process is killed, the child attaches itself to init, PID 1.
>
>What causes a process to refuse to die? I thought signal 9 (kill) could
>not be intercepted or ignored?

wait! don't touch that reset button! there is life beyond shells!
you can kill the process (either by root or by the user who started it)
but you MUST kill of not only the process, but also all of it's
children too! (mass genocide!! ;-) if you dont, any child process
under the 'immortal script' is given a new PPID of 1 and thus itself
becomes immortal, and may spawn and produce children itself, etc...
whip out you trusty 'kill -9' and gun down those suckers!

note: the massacre outlined above will produce really nasty effects
if the process was any sort of compile, ESPECIALLY a makefile run.

good hunting!



More information about the Comp.unix.microport mailing list