RE: Intermittent File Upload Failures - CGI tmpfile unlinked

2010-03-30 Thread Ihnen, David
Let us say for the sake of example that this is the sequence during success: 1. create/open file 2. write to file 3. close file 4. reopen file 5. provide file handle 6. close file 7. unlink file Lets imagine that something went wrong with the apache server and it dropped the post/form data that

RE: Intermittent File Upload Failures - CGI tmpfile unlinked

2010-03-30 Thread mjurgens
You'll need to be more precise than this because I can't quite follow your logic given that in a "good" process the strace shows the file being written to, but in a "bad" process it shows it being unlinked instead of being written to (and it is never written to, and the perl also can not find the

Re: Intermittent File Upload Failures - CGI tmpfile unlinked

2010-03-30 Thread Janet Fredericks
I am having similar problems, though I'm not sure about temp files etc. I have cgi-bin files that have been running for 5 years through two upgrades. I just upgraded my OS to CentOS; perl to 5.8xxx and installed new Net::Telnet (WORKS FINE) ... and the new CGI cpan module -- runs -- but the

RE: Intermittent File Upload Failures - CGI tmpfile unlinked

2010-03-30 Thread Ihnen, David
An open file handle is a link; when creating a file with open you actually have two links to the file - one for the directory's link to it, and one for the process's link to it. Therefore unlinking the file from the file system simply reduces its link count to 1, and it will stay around, writab

Intermittent File Upload Failures - CGI tmpfile unlinked

2010-03-30 Thread mjurgens
I need some help trying to work out why CGI.pm (guessing at the module) appears to unlink a temporary file just after opening it and before writing some uploaded file content to it. I use in a form which I POST to a modperl Apache server (version 2.2.14) on Fedora 10. Intermittently the perl scr