Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 7348 invoked from network); 5 Jul 2004 11:29:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jul 2004 11:29:56 -0000 Received: (qmail 63734 invoked by uid 500); 5 Jul 2004 11:29:30 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 63583 invoked by uid 500); 5 Jul 2004 11:29:28 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 63463 invoked by uid 99); 5 Jul 2004 11:29:27 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Mon, 05 Jul 2004 04:29:26 -0700 Received: (qmail 26025 invoked by uid 65534); 5 Jul 2004 11:29:23 -0000 Received: from dsl-213-023-239-020.arcor-ip.net (EHLO blue) (213.23.239.20) by mail.gmx.net (mp012) with SMTP; 05 Jul 2004 13:29:23 +0200 X-Authenticated: #20142289 Date: Mon, 5 Jul 2004 13:29:23 +0200 From: Markus Wichitill To: randy@theoryx5.uwinnipeg.ca Cc: apreq-dev@httpd.apache.org Subject: Re: [apreq-2] $upload->tempname on Win32 Message-ID: References: <87wu1jutv3.fsf@gemini.sunstarsys.com> X-Mailer: AK-Mail 3.5 [ger] (registered, single user license) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >> 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. The practical problem on Win32 is that I can't pass $upload->tempname to someone else's code (maybe an external program that can't accept handles) since that code won't use APR::PerlIO and therefore won't be able to make any use of the exclusively locked tempfile. I haven't tested $upload->link yet, but I'd assume a created NTFS hardlink will be similarly useless during the request, if the linking works at all. I don't know enough of the internals to actually suggest anything. I'm just wondering if relying on the OS to delete the file doesn't make things more complicated than necessary, and who knows what other problems could come up with other filesystems (NFS? SMB shares? What do I know).