projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ec3aa3
)
Fix my_pclose segfault
author
Simon Cozens
<simon@netthink.co.uk>
Wed, 10 Jan 2001 18:39:35 +0000
(18:39 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Wed, 10 Jan 2001 18:43:15 +0000
(18:43 +0000)
Message-ID: <
20010110183934
.A25640@pembro26.pmb.ox.ac.uk>
p4raw-id: //depot/perl@8391
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index
1261b98
..
c9174fe
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-2663,7
+2663,9
@@
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 = SvIV(*svp);
+ if (!pid)
+ return 0;
SvREFCNT_dec(*svp);
*svp = &PL_sv_undef;
#ifdef OS2