Author Emil.Styrke
Recipients Emil.Styrke, amaury.forgeotdarc, brian.curtin, eckhardt, ggenellina, javen72, terry.reedy
Date 2015-03-26.06:40:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have experienced this issue with Python 2.7.8 and 2.7.9.  It is almost the same issue as the OP experiences as far as I can tell: spawn some Python threads that each create a file, flush, fsync, close, then start a subprocess which uses the file through the Windows API.  One thing that may differ is that I create the file and spawn the child from the same thread.

I tried with close_fds=True, and it indeed works then, but like the OP, in my production code I need to get the output from the process, so it is not a usable workaround for me.

Test script and child program code is available at (the file upload button doesn't work for me it seems).  Running the script on my machine will print at least one failure most of the time, but not always.
Date User Action Args
2015-03-26 06:40:11Emil.Styrkesetrecipients: + Emil.Styrke, terry.reedy, amaury.forgeotdarc, ggenellina, eckhardt, javen72, brian.curtin
2015-03-26 06:40:11Emil.Styrkesetmessageid: <>
2015-03-26 06:40:11Emil.Styrkelinkissue4944 messages
2015-03-26 06:40:10Emil.Styrkecreate