Steve Hay wrote:
Stas Bekman wrote:

Steve Hay wrote:

Hi,

After running the test suite with mp1.28 on Windows I find that I have a temporary file left behind in my temp dir (in my case, C:\Temp).

This happens because the filehandle is left open. The attached patch closes it, and the file gets deleted automatically later.



I suppose we can/should do that, but isn't it a responsibility of CGI.pm to do that?


-private_tempfiles
CGI.pm can process uploaded file. Ordinarily it spools the uploaded
file to a temporary directory, then deletes the file when done.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


I remember this was a bug in the older CGI.pm versions, which was fixed long time ago. I can't reproduce it with CGI 2.97.


I'm running CGI.pm 2.97 too. I've had similar trouble with other software that I've written. It may be a Windows-specific thing:

"On Unix systems, the -private_tempfiles pragma will cause the temporary file to be unlinked as soon as it is opened and before any data is written into it ..."
^^^^

Did you mean to underline the UNIX word?


> "On Unix systems,
      ^^^^^

I can't find in the CGI.pm manpage, where it says that the filehandle should be closed, even on windows. Perhaps ask Lincoln?

In any case, I have committed your patch, Steve.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to