russell@ccu1.aukuni.ac.nz (Russell J Fulton;ccc032u) (01/11/91)
I recently had a perl script run away on me. (The bug was mine!) Anyway this script called system to delete files repeatedly. When I tried to us ^C to stop the program the ^C appearently killed the currently active system("rm -r ..."), but did not kill the driving script. And yes, you've guessed, it was happly working its way through the passwd file deleting all the users I wanted to keep!! What I did in the end was to start another shell and use kill to stop the perl script. I have just spent all of today putting the system back together. My question is: was there a quick way I could have stopped the script? or alternatively is there some way I can detect that system was terminated by an interupt? (I have tried to read the man page for wait(2) for our system to find out what wait returns but I could not make much sense out of it.) Russell. -- Russell Fulton, Computer Center, University of Auckland, New Zealand. <rj_fulton@aukuni.ac.nz>