diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-03-17 18:42:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-03-17 18:42:30 +0000 |
commit | c586124f72c3990bdacc564215636607a575c10f (patch) | |
tree | a6261873504a06d8901fc48132bcc5d66a5edd5f /perlio.c | |
parent | 9366364f60d5a0aaad2a616e814a46be2ec03c74 (diff) | |
download | perl-c586124f72c3990bdacc564215636607a575c10f.tar.gz |
PerlIO_importFILE() should increase the reference count on the fd
that it brings into PerlIO managed space. (A long standing problem
reported by Steve Hay)
p4raw-id: //depot/perl@30610
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |