From: Gurusamy Sarathy Date: Sun, 2 May 1999 19:24:41 +0000 (+0000) Subject: close directory handles properly when localized X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93578b34124e8a3b976cd7f68c60e871e698c9d5;p=p5sagit%2Fp5-mst-13.2.git close directory handles properly when localized p4raw-id: //depot/perl@3298 --- diff --git a/sv.c b/sv.c index 218eff9..6068583 100644 --- a/sv.c +++ b/sv.c @@ -2734,7 +2734,13 @@ sv_clear(register SV *sv) IoIFP(sv) != PerlIO_stdin() && IoIFP(sv) != PerlIO_stdout() && IoIFP(sv) != PerlIO_stderr()) + { io_close((IO*)sv); + } + if (IoDIRP((IO*)sv)) { + PerlDir_close(IoDIRP((IO*)sv)); + IoDIRP((IO*)sv) = 0; + } Safefree(IoTOP_NAME(sv)); Safefree(IoFMT_NAME(sv)); Safefree(IoBOTTOM_NAME(sv));