Re: mod_perl and lazy zombiesby andreychek (Parson)
|on Jun 07, 2001 at 18:53 UTC||Need Help??|
I ran across this in the mod_perl guide:
When you write a script running under mod_cgi, you can get away with sloppy programming, like opening a file and letting the interpreter close it for you when the script had finished its run...
For mod_perl, before the end of the script you must close() any files you opened!
If you forget to close(), you might get file descriptor leakage and (if you flock()ed on this file descriptor) also unlock problems.
Later on in that same section, they actually go as far as recommending
you use IO::File to do work with files under mod_perl in case the
interpreter stops before getting to run the close statement (ie, the user
presses the stop button in their browser).