Joe Schaefer <[EMAIL PROTECTED]> writes: > "Vinay Y S" <[EMAIL PROTECTED]> writes: > >> There is a problem with apreq temp file cleanup on win32. For each >> POST request with POST body greater than 256KB, TWO temp files of >> exact same size get created in temp directory and they are not deleted >> even after the request is handled. They get deleted when apache server >> is stopped. > > Thanks for the detailed report and patch! > What version of apr are you using? The reason I ask is > because whenever you open a file, normally a pool cleanup hook is > registered to close it.
Ah, I see now. I should have looked at the source before opening my mouth ;-): flag = APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | APR_BINARY; /* Win32 needs the following to remove temp files. * XXX: figure out why the APR_SHARELOCK flag works; * a grep through the httpd sources seems to indicate * it's only used in sdbm files?? */ #ifdef WIN32 flag |= APR_FILE_NOCLEANUP | APR_SHARELOCK; #endif rc = apr_file_mktemp(fp, tmpl, flag, pool); Randy, do you know why we use the APR_FILE_NOCLEANUP flag? Maybe we should just remove that and see if it fixes the problem Vinay is seeing. -- Joe Schaefer