RESOLVED FIXED 170838
executive.py fails on Windows
https://bugs.webkit.org/show_bug.cgi?id=170838
Summary executive.py fails on Windows
Bill Ming
Reported 2017-04-13 17:35:11 PDT
scripts like webkit-patch will fail on Windows due to an error in executive.py. Based on the description in https://docs.python.org/2/library/subprocess.html "Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr." Setting close_fds to False on Windows solved the issue.
Attachments
Patch (1.58 KB, patch)
2017-04-13 17:40 PDT, Bill Ming
no flags
Bill Ming
Comment 1 2017-04-13 17:40:38 PDT
Bill Ming
Comment 2 2017-04-19 10:22:22 PDT
Can someone take a look at this?
Per Arne Vollan
Comment 3 2017-04-19 10:27:34 PDT
I think setting close_fds to true will work if you run Python 2.7.10 or later.
Bill Ming
Comment 4 2017-04-19 10:32:11 PDT
(In reply to Per Arne Vollan from comment #3) > I think setting close_fds to true will work if you run Python 2.7.10 or > later. Thanks for the reply. I'm running python 2.7.13, which I believe should work, and in fact it doesn't. >python --version Python 2.7.13 Besides, the following line is from python 2.7.13 doc: > Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr. https://docs.python.org/2/library/subprocess.html
Per Arne Vollan
Comment 5 2017-04-19 11:18:56 PDT
(In reply to Bill Ming from comment #4) > (In reply to Per Arne Vollan from comment #3) > > I think setting close_fds to true will work if you run Python 2.7.10 or > > later. > > Thanks for the reply. > > I'm running python 2.7.13, which I believe should work, and in fact it > doesn't. > > >python --version > Python 2.7.13 > > Besides, the following line is from python 2.7.13 doc: > > > Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr. > > https://docs.python.org/2/library/subprocess.html That is strange, I don't seem to have this issue with Cygwin Python 2.7.10. Are you running Cygwin?
Bill Ming
Comment 6 2017-04-19 11:23:13 PDT
No, I'm using the official python installation package for windows. Maybe in cygwin the stdio is treated differently than CMD.
Brent Fulgham
Comment 7 2017-04-19 11:28:02 PDT
(In reply to Bill Ming from comment #6) > No, I'm using the official python installation package for windows. > > Maybe in cygwin the stdio is treated differently than CMD. It makes sense that stdio behavior between Cygwin and native Windows Python could be very different. I think this change seems fine, as long as it's limited to non-cygwin builds.
Brent Fulgham
Comment 8 2017-04-19 11:28:59 PDT
Comment on attachment 307059 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=307059&action=review > Tools/Scripts/webkitpy/common/system/executive.py:100 > + return True This seems reasonable for Windows-specific behavior.
WebKit Commit Bot
Comment 9 2017-04-19 11:57:52 PDT
Comment on attachment 307059 [details] Patch Clearing flags on attachment: 307059 Committed r215523: <http://trac.webkit.org/changeset/215523>
WebKit Commit Bot
Comment 10 2017-04-19 11:57:54 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.