httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: [apreq-2] $upload->tempname on Win32
Date Mon, 05 Jul 2004 04:23:17 GMT
On Sun, 4 Jul 2004, Joe Schaefer wrote:

> Markus Wichitill <mawic@gmx.de> writes:
>
> [...]
>
> > Would it be possible to delete the tempfile in a cleanup handler
> > instead of relying on flags like FILE_FLAG_DELETE_ON_CLOSE and Unix
> > filesystem behaviour?
>
> Seems unlikely that'll improve anything.  The tempfile
> is closed by a pool cleanup handler, and the OS subsequently
> unlinks it *then* because of the flags apreq_mktemp() sets when
> the file was first created/opened.  I don't see anything
> particularly Unix-specific about this situation; we're simply
> relying on apr to provide the C portability, and mp2 to provide
> access to it from perl.
>
> From the discussion so far, I'll once again point out that
> everyone seems to be able to open $upload->tempname using
> either "<" or "<:APR".  The associated issues need to be
> documented (I'm certainly _not_ volunteering for that),
> and if there's a way to make the decision programatically,
> let's please include that in our fh() implementation so our
> users don't have to worry about making the right choice.

I'm not sure what would be gained either (I assume this is
all a Win32 issue). Markus, are you suggesting that the
APR_DELONCLOSE flag used in the apr_file_mktemp() call
within apreq_file_mktemp() of src/apreq.c be dropped, and
that the temp files subsequently left around be cleaned up
explicitly by apreq? That would allow Perl's open() to be
used, instead of the current demand of APR::PerlIO, in this
context, but would there be a strong reason for doing this?
APR::PerlIO is already available, and Joe's recent fh()
implementation within Apache::Upload already returns a
filehandle using APR::PerlIO behind the scenes.

-- 
best regards,
randy

Mime
View raw message