"Craig A. Berry" <[EMAIL PROTECTED]> wrote on 09/12/2003 01:09:55 PM:

> The problem originates in PerlIO_tmpfile in perlio.c, which creates
> temporary files but does not seem to do anything to clean them up.
> It calls mkstemp() and fdopen() to create temporary files, but there
> is nothing that would set fop=dlt to cause the file to be deleted on
> close.  One thing I don't know offhand, though, is whether PerlIO
> ever needs to close a temporary file and reopen it, or whether it
> always keeps it open until it's completely done with it.  If the
> latter, then it should be safe to delete on close.
>
> Win32 goes its own way in perlio.c and I suppose we could too.  Quite
> possibly the following would be all that would be required, because
> if I read the headers right it would cause us to end up using the
> Perl_my_tmpfile() from vms.c, which does set fop=dlt.
>
> --- perlio.c;-1 Sat Aug 30 15:12:10 2003
> +++ perlio.c    Fri Sep 12 11:57:51 2003

Excellent.  Thanks for the quick fix.  I was able to
apply this to a recently rsynced [EMAIL PROTECTED] kit and
with an C<@configure "-des"> build obtained:

All tests successful.
u=90.1  s=0  cu=0  cs=0  scripts=734  tests=75736

and, having deleted all of the previous SYS$SCRATCH:PERLIO_%%%%%%.;*
files I now see only these:

$ dir/since/date/size sys$scratch:

Directory USER:[PPRYMMER]

FILE-SPEC-0_85_01.DIR;1
                           1  12-SEP-2003 09:18:50.66
FILE-SPEC-0_85_01.TAR;1
                         280  12-SEP-2003 09:18:25.28
FTP_SERVER.LOG;2          13  12-SEP-2003 14:08:23.41
FTP_SERVER.LOG;1          12  12-SEP-2003 09:17:09.63
MD711343255.SDBM_DIR;1
                           0  12-SEP-2003 15:35:59.07
MD711367828.SDBM_DIR;1
                           0  12-SEP-2003 15:35:57.08
PERLPIPE_2A65EB60_4.COM;1
                           2  12-SEP-2003 09:19:34.58

Total of 7 files, 308 blocks.

Where the SDBM_DIR files are from sdbm regression testing
and the perlpipe file was the temporary from before
(that I've not gotten around to deleting yet).


> I have not had a chance to build with this, much less test, but
> that's what I know about the situation.  The workaround is obviously
> to clean out your scratch space frequently.

I'd say go ahead and submit it to p5p, it looks and tests
great as far as I can tell.  Thanks again for the quick fix.

Peter Prymmer

Reply via email to