httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: [apreq-2] Open upload with or without :APR
Date Thu, 22 Jul 2004 18:24:53 GMT
Markus Wichitill <> writes:

> Joe Schaefer wrote:
> > Markus Wichitill <> writes:
> >>Regarding the last chunk: for the link test in to succeed,
> >>I didn't actually need the :APR on Win32, unlike for the link test in
> >> I'm not sure why, but I guess using the same code can't hurt.

> > Probably because link()ed files don't need to SHARE_DELETE,
> > since only the temp file is actually scheduled for deletion.

So I have this completely wrong then, big surprise :-).

> But the link test in does need the :APR open in my case, since
> otherwise opening the file will fail with "permission denied". That's
> what I reported in my various issues thread.

Ok, now it is clearer to me- thanks.  What was confusing was that 
the link() test code in was passing there, but not for  I believe the reason for this is that in
the upload brigade is entirely in-memory (it's roughly 100 KB in size,
which is < 256 KB required to force a write to disk). The write-to-disk
actually happens during link() (see Apache__Upload.h line 148), in which 
case we do *not* pass the DELONCLOSE flag.  That explains why you don't
currently need ":<APR" for smallish uploads.

> All in all, this is so ugly and confusing that I still think that
> explicitely deleting the tempfile with a cleanup handler without using
> special Win32 flags would be the simplest solution,

+1 (bigtime).  We need to remove APR_DELONCLOSE in apreq_file_mktemp and
have it register a pool cleanup to delete the created file.

Joe Schaefer

View raw message