From: Nick Ing-Simmons Date: Wed, 10 Jan 2001 21:29:19 +0000 (+0000) Subject: Safe fix for Simon's pclose() doing SvIVX of undef -> core bug. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25d920232779109764865e51a54577792f1390e3;p=p5sagit%2Fp5-mst-13.2.git Safe fix for Simon's pclose() doing SvIVX of undef -> core bug. p4raw-id: //depot/perlio@8399 --- diff --git a/util.c b/util.c index 1261b98..27c6953 100644 --- a/util.c +++ b/util.c @@ -2663,7 +2663,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr) LOCK_FDPID_MUTEX; svp = av_fetch(PL_fdpid,PerlIO_fileno(ptr),TRUE); UNLOCK_FDPID_MUTEX; - pid = SvIVX(*svp); + pid = (SvTYPE(*svp) == SVt_IV) ? SvIVX(*svp) : -1; SvREFCNT_dec(*svp); *svp = &PL_sv_undef; #ifdef OS2