This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9366364
)
PerlIO_importFILE() should increase the reference count on the fd
author
Nicholas Clark
<nick@ccl4.org>
Sat, 17 Mar 2007 18:42:30 +0000
(18:42 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Sat, 17 Mar 2007 18:42:30 +0000
(18:42 +0000)
that it brings into PerlIO managed space. (A long standing problem
reported by Steve Hay)
p4raw-id: //depot/perl@30610
perlio.c
patch
|
blob
|
blame
|
history
diff --git
a/perlio.c
b/perlio.c
index
544b642
..
bba198c
100644
(file)
--- a/
perlio.c
+++ b/
perlio.c
@@
-2879,6
+2879,7
@@
PerlIO_importFILE(FILE *stdio, const char *mode)
if ((f = PerlIO_push(aTHX_(f = PerlIO_allocate(aTHX)), PERLIO_FUNCS_CAST(&PerlIO_stdio), mode, NULL))) {
s = PerlIOSelf(f, PerlIOStdio);
s->stdio = stdio;
+ PerlIOUnix_refcnt_inc(fileno(stdio));
}
}
return f;