Stas Bekman wrote:

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,
^^^^^

Yes. (That line wasn't wrapped when I wrote the mail, just afterwards when I sent it.)




I can't find in the CGI.pm manpage

It's right after the bit that you quoted :-) Lines 4439-4442 in the CGI.pm of 2.97.


, where it says that the filehandle should be closed, even on windows. Perhaps ask Lincoln?

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

Thanks.



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



Reply via email to