Change 33492 did not spread the protection wide enough. There were
authorNicholas Clark <nick@ccl4.org>
Wed, 12 Mar 2008 19:09:21 +0000 (19:09 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 12 Mar 2008 19:09:21 +0000 (19:09 +0000)
commit9bab90c0f28bfa909019e7c256fe9c7dfb6ca308
tree86aabffb91591a9317aa1fc3bff9eecd5bd0e8d8
parentb63c7c552a2e9cf2b2c5eb492358b8567fd16179
Change 33492 did not spread the protection wide enough. There were
still two more races to be lost.
1: The close() could still happen after the (premature) mutex release
   allowed another thread to dup() to that file descriptor.
2: The initial dup() could happen whilst another thread was in the
   mutex protected region, and had temporarily closed the file
   descriptor.
Race conditions remain with any other thread that actually does I/O
during the execution of the mutex protected region (as noted in a
comment), and dup() failure is not handled gracefully (also noted).

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