Signaling all descendents of a process

marc at emory.UUCP marc at emory.UUCP
Fri Nov 11 14:11:01 AEST 1983


Has anyone ever found a way to send a signal to all descendents
of a given process ?  Indeed it is something I've wanted to do
many times and can find no clean way to do.  In fact - if a 
process A begat B and B begat C - and B is killed - then C is
inherited by 1 - and the lineage is broken.  There is know way
i can tell (by digging into kmem) that one can know C's granddaddy
was A.  True - we can kill process groups, (artifically extended
familys ?) but that is not what i want.  The intended application
here is we give a user a special shell (and we record the process
id), then when said user exits (or is requested to exit) we want
to insure that no detached processes of his are left around -
I.e. annihilate all ancesters of the shells pid.

How bout a find -pid XXX -exec kill -9 {} \;

Seriously - if noone knows a way, i guess a restricted shell may
suffice...

Please send any helpful info to me by mail - i don't get a chance
to read much off the net anymore. (hopefully we'll be running news
on our new 780 soon)...

Thanks, Marcus Teitelbaum	(Emory U Computing Center)

(sb1!emory!emoryu1!marc)



More information about the Comp.unix.wizards mailing list