<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>170838</bug_id>
          
          <creation_ts>2017-04-13 17:35:11 -0700</creation_ts>
          <short_desc>executive.py fails on Windows</short_desc>
          <delta_ts>2017-04-19 11:57:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bill Ming">mbbill</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>buildbot</cc>
    
    <cc>commit-queue</cc>
    
    <cc>glenn</cc>
    
    <cc>lforschler</cc>
    
    <cc>pvollan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1297234</commentid>
    <comment_count>0</comment_count>
    <who name="Bill Ming">mbbill</who>
    <bug_when>2017-04-13 17:35:11 -0700</bug_when>
    <thetext>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
&quot;Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr.&quot;

Setting close_fds to False on Windows solved the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1297236</commentid>
    <comment_count>1</comment_count>
      <attachid>307059</attachid>
    <who name="Bill Ming">mbbill</who>
    <bug_when>2017-04-13 17:40:38 -0700</bug_when>
    <thetext>Created attachment 307059
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298719</commentid>
    <comment_count>2</comment_count>
    <who name="Bill Ming">mbbill</who>
    <bug_when>2017-04-19 10:22:22 -0700</bug_when>
    <thetext>Can someone take a look at this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298720</commentid>
    <comment_count>3</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-19 10:27:34 -0700</bug_when>
    <thetext>I think setting close_fds to true will work if you run Python 2.7.10 or later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298722</commentid>
    <comment_count>4</comment_count>
    <who name="Bill Ming">mbbill</who>
    <bug_when>2017-04-19 10:32:11 -0700</bug_when>
    <thetext>(In reply to Per Arne Vollan from comment #3)
&gt; I think setting close_fds to true will work if you run Python 2.7.10 or
&gt; later.

Thanks for the reply.

I&apos;m running python 2.7.13, which I believe should work, and in fact it doesn&apos;t.

&gt;python --version
Python 2.7.13

Besides, the following line is from python 2.7.13 doc:

&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298741</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-04-19 11:18:56 -0700</bug_when>
    <thetext>(In reply to Bill Ming from comment #4)
&gt; (In reply to Per Arne Vollan from comment #3)
&gt; &gt; I think setting close_fds to true will work if you run Python 2.7.10 or
&gt; &gt; later.
&gt; 
&gt; Thanks for the reply.
&gt; 
&gt; I&apos;m running python 2.7.13, which I believe should work, and in fact it
&gt; doesn&apos;t.
&gt; 
&gt; &gt;python --version
&gt; Python 2.7.13
&gt; 
&gt; Besides, the following line is from python 2.7.13 doc:
&gt; 
&gt; &gt; Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr.
&gt; 
&gt; https://docs.python.org/2/library/subprocess.html

That is strange, I don&apos;t seem to have this issue with Cygwin Python 2.7.10. Are you running Cygwin?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298743</commentid>
    <comment_count>6</comment_count>
    <who name="Bill Ming">mbbill</who>
    <bug_when>2017-04-19 11:23:13 -0700</bug_when>
    <thetext>No, I&apos;m using the official python installation package for windows.

Maybe in cygwin the stdio is treated differently than CMD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298749</commentid>
    <comment_count>7</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-04-19 11:28:02 -0700</bug_when>
    <thetext>(In reply to Bill Ming from comment #6)
&gt; No, I&apos;m using the official python installation package for windows.
&gt; 
&gt; 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&apos;s limited to non-cygwin builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298751</commentid>
    <comment_count>8</comment_count>
      <attachid>307059</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-04-19 11:28:59 -0700</bug_when>
    <thetext>Comment on attachment 307059
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307059&amp;action=review

&gt; Tools/Scripts/webkitpy/common/system/executive.py:100
&gt; +            return True

This seems reasonable for Windows-specific behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298764</commentid>
    <comment_count>9</comment_count>
      <attachid>307059</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-04-19 11:57:52 -0700</bug_when>
    <thetext>Comment on attachment 307059
Patch

Clearing flags on attachment: 307059

Committed r215523: &lt;http://trac.webkit.org/changeset/215523&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298765</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-04-19 11:57:54 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>307059</attachid>
            <date>2017-04-13 17:40:38 -0700</date>
            <delta_ts>2017-04-19 11:57:52 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-170838-20170413174037.patch</filename>
            <type>text/plain</type>
            <size>1617</size>
            <attacher name="Bill Ming">mbbill</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjE1MzA5CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggMzA2Y2ZmOTRiYjJjNTU4MDdlODdlYzFkYTZhMDdlZWJh
ZGVmMjc4OS4uYjA0NzM1Njc0M2IzMjgwYWVjOGViMTIwNTk1ZTU4ZjBkZmU3MDAzYiAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDEz
IEBACisyMDE3LTA0LTEzICBCaWxsIE1pbmcgIDxtYmJpbGxAZ21haWwuY29tPgorCisgICAgICAg
IGNsb3NlX2ZkcyBzaG91bGQgYmUgc2V0IHRvIEZhbHNlIG9uIFdpbmRvd3MuCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNzA4MzgKKworICAgICAgICBS
ZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIFNjcmlwdHMvd2Via2l0cHkv
Y29tbW9uL3N5c3RlbS9leGVjdXRpdmUucHk6CisgICAgICAgIChFeGVjdXRpdmUuX3Nob3VsZF9j
bG9zZV9mZHMpOgorCiAyMDE3LTA0LTEyICBBbGV4IENocmlzdGVuc2VuICA8YWNocmlzdGVuc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dGluZyBzdGRpbiwg
c3Rkb3V0IG9yIHN0ZGVyci4iLgorICAgICAgICBpZiBzeXMucGxhdGZvcm0uc3RhcnRzd2l0aCgn
d2luJyk6CisgICAgICAgICAgICByZXR1cm4gRmFsc2UKKyAgICAgICAgZWxzZToKKyAgICAgICAg
ICAgIHJldHVybiBUcnVlCiAKICAgICBkZWYgX3J1bl9jb21tYW5kX3dpdGhfdGVlZF9vdXRwdXQo
c2VsZiwgYXJncywgdGVlZF9vdXRwdXQsICoqa3dhcmdzKToKICAgICAgICAgY2hpbGRfcHJvY2Vz
cyA9IHNlbGYucG9wZW4oYXJncywK
</data>

          </attachment>
      

    </bug>

</bugzilla>