diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-03-24 11:20:33 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-03-24 11:20:33 +0000 |
commit | 38cd91168e939f4687d9a1275f67512d78017fa3 (patch) | |
tree | 4066ae8b7cfd01db0a08dcb8b738865b24419e73 /util.c | |
parent | bef10a86a57eda3140922972782e9a32409f68cc (diff) | |
download | perl-38cd91168e939f4687d9a1275f67512d78017fa3.tar.gz |
perl 5.002_01: util.c
Change e_fp test to use e_tmpname, since e_fp is reset
when file is lcosed in perl.c
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -825,10 +825,14 @@ long a1, a2, a3, a4; } fputs(message,stderr); (void)Fflush(stderr); - if (e_fp) { - fclose(e_fp); - e_fp = Nullfp; + if (e_tmpname) { + if (e_fp) { + fclose(e_fp); + e_fp = Nullfp; + } (void)UNLINK(e_tmpname); + Safefree(e_tmpname); + e_tmpname = Nullch; } statusvalue = SHIFTSTATUS(statusvalue); #ifdef VMS @@ -984,10 +988,14 @@ croak(pat, va_alist) } fputs(message,stderr); (void)Fflush(stderr); - if (e_fp) { - fclose(e_fp); - e_fp = Nullfp; + if (e_tmpname) { + if (e_fp) { + fclose(e_fp); + e_fp = Nullfp; + } (void)UNLINK(e_tmpname); + Safefree(e_tmpname); + e_tmpname = Nullch; } statusvalue = SHIFTSTATUS(statusvalue); #ifdef VMS |