This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
We need mutex protection in PerlIOStdio_close() for the duration of
authorNicholas Clark <nick@ccl4.org>
Wed, 12 Mar 2008 12:23:55 +0000 (12:23 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 12 Mar 2008 12:23:55 +0000 (12:23 +0000)
commit711e8db2defd635d78bc9d3e168dbd0a8a3b89fa
tree414b704b85c5547624f20317b801e506c48ac4ea
parent1d791a44a46c93b2808774b83d9ca1f346372145
We need mutex protection in PerlIOStdio_close() for the duration of
holding our true love file handle open, to stop anything else
temporarily using it for a quick dup() fling, and then closing the
file handle underneath us.
I suspect that the lack of this protection was the cause of the threads
free.t and blocks.t failures on OS X on 5.8.x, where usefaststdio is
the default, and PerlIO is unable to "invalidate" the FILE *.

p4raw-id: //depot/perl@33492
perlio.c