Author Preston Moore
Recipients Preston Moore, giampaolo.rodola, vstinner, zach.ware
Date 2018-07-23.17:46:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hey everyone,

I have updated the pull request to include a version of copyfile() that attempts to address the discussed race condition by open()’ing a file descriptor to the relevant files as early as possible and maintaining it throughout processing.  In order for this to work I had to use some lower level posix-only features. Specifically, I had to open() the files non-blocking initially and using fcntl() to make them blocking once some initial checks have been performed.  The functions behavior under Windows should be unchanged.  I chose this course because Windows doesn’t support fcntl() or with O_NONBLOCK.

I will add a few additional tests around the new checks and get things ready for a merge.  I would also be glad to use a strategy of this nature to fix similar bugs in the other areas discussed above.

Date User Action Args
2018-07-23 17:46:26Preston Mooresetrecipients: + Preston Moore, vstinner, giampaolo.rodola, zach.ware
2018-07-23 17:46:26Preston Mooresetmessageid: <>
2018-07-23 17:46:26Preston Moorelinkissue30400 messages
2018-07-23 17:46:26Preston Moorecreate