Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cleaning up after failed script

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I have recently configured a new computer for my dev work. The old one has served me well but has gone to the great server room in the sky.
Code:
Microsoft XP
apache_2.2.6-win32-x86-openssl-0.9.8e.msi
Everything is working as it should do but I need to sort out a little problem which I have had for years and never got round to investigating.

Whenever I lock up a program, usually because of a simple typo, I can stop the web page which the script creates but the perl.exe process keeps running in the background. If I keep running scripts which do not terminate, I finish up with many perl processes running.
The perl process is killed after a successful run how do I get perl to tidy up after itself?

Keith
 
are you running a script with forks? which might be creating the multiple processes

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
These are just ordinary scripts which are not closed following an error.
Missing a speech mark off a line causes the script to lock up and not close the process. I assume that, missing a speech mark causes a knock on effect throughout the script and produces so many errors that Perl just throws its rattle from the pram.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top