diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-02-15 16:33:24 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-02-15 16:34:22 -0800 |
commit | 2e0cfa16dea85dd33fe3cbf38f3324f4a8418181 (patch) | |
tree | 5189c0767046a1d431bd10c87d9b34efbed4ea04 /perliol.h | |
parent | c222ef4643569ab52b77652219561edee7a72409 (diff) | |
download | perl-2e0cfa16dea85dd33fe3cbf38f3324f4a8418181.tar.gz |
[perl #78494] Pipes cause threads to hang on join()
or on close() in either thread.
close() in one thread blocks until close() is called in the other
thread, because both closes are waiting for the child process to end.
Since we have a reference-counting mechanism for the underlying
fileno, we can use that to determine whether close() should wait.
This does not solve the problem of close $OUT block when it has been
duplicated via open $OUT2, ">&" and $OUT2 is still in scope.
Diffstat (limited to 'perliol.h')
-rw-r--r-- | perliol.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -279,6 +279,7 @@ PERL_EXPORT_C IV PerlIOUnix_pushed(pTHX_ PerlIO *f, const char *mode, SV PERL_EXPORT_C SSize_t PerlIOUnix_read(pTHX_ PerlIO *f, void *vbuf, Size_t count); PERL_EXPORT_C int PerlIOUnix_refcnt_dec(int fd); PERL_EXPORT_C void PerlIOUnix_refcnt_inc(int fd); +PERL_EXPORT_C int PerlIOUnix_refcnt(int fd); PERL_EXPORT_C IV PerlIOUnix_seek(pTHX_ PerlIO *f, Off_t offset, int whence); PERL_EXPORT_C Off_t PerlIOUnix_tell(pTHX_ PerlIO *f); PERL_EXPORT_C SSize_t PerlIOUnix_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count); |