On Fri, 15 Feb 2002, Trace, Robert wrote: > > Should not each iteration of the while loop (in which $stderr > > and $stdin are defined as my variables) result in perl closing > > the file and releasing the file descriptor? > > Yes, it should (and it appears as though Perl is correctly destroying > the objects as they fall out of scope). > > It appears that despite IO::File's attempts to clean up (via DESTROY), > something is being leaked and/or left open. I tried various > combinations of explicitly closing the streams at the end of the loop > ($stdout->close), switching to real files (instead of new_tmpfile's), > explicitly undef'ing the variables (to force destruction), etc. > > In every test 'high-level' perl seemed to be behaving correctly > (destroying objects and closing descriptors). I can only conclude that > it's a problem with 'low-level' perl (e.g. the I/O layer). > > I filed a bug (#19226) with ActiveState. Gurusamy Sarathy responded > with a patch (it appears as though it may have been a known bug). I > have yet to check out the patch, but I'm hoping that it'll help out. >
You mentioned the IO::File DESTROY method trying to cleanup the file descriptors but it appears to me (at least based on perl 5.03, IO::Handle version 1.1505, XS version 1.15) that the DESTROY method is coded to be a no-op, leaving any clean up to perl's handling of the closing of a file. Is the DESTROY method for 5.6 different? **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs