RESOLVED FIXED 62179
webkitpy: add a popen() call to executive
https://bugs.webkit.org/show_bug.cgi?id=62179
Summary webkitpy: add a popen() call to executive
Dirk Pranke
Reported 2011-06-06 19:44:17 PDT
webkitpy: add a popen() call to executive
Attachments
Patch (3.66 KB, patch)
2011-06-06 19:44 PDT, Dirk Pranke
no flags
Patch (3.93 KB, patch)
2011-06-06 19:46 PDT, Dirk Pranke
eric: review+
Dirk Pranke
Comment 1 2011-06-06 19:44:45 PDT
Dirk Pranke
Comment 2 2011-06-06 19:46:10 PDT
Eric Seidel (no email)
Comment 3 2011-06-07 16:29:16 PDT
Comment on attachment 96183 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=96183&action=review I'm OK with this change. It's more interesting when we see it used. > Tools/Scripts/webkitpy/common/system/executive.py:107 > + PIPE = subprocess.PIPE > + STDOUT = subprocess.STDOUT I'm not sure this bit is super useful. Especially since we don't ahve STDERR and STDIN there.
Eric Seidel (no email)
Comment 4 2011-06-07 16:29:44 PDT
Another quesiton to ask... why do some parts of the code need popen? Should we be providing more limited APIs with Executive instead of adding popen?
Dirk Pranke
Comment 5 2011-06-07 16:34:29 PDT
(In reply to comment #3) > (From update of attachment 96183 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=96183&action=review > > I'm OK with this change. It's more interesting when we see it used. > Sure, that'll be showing up shortly in a different patch. > > Tools/Scripts/webkitpy/common/system/executive.py:107 > > + PIPE = subprocess.PIPE > > + STDOUT = subprocess.STDOUT > > I'm not sure this bit is super useful. Especially since we don't ahve STDERR and STDIN there. These are useful insofar as they allow me to not have to import subprocess directly. STDERR and STDIN aren't there because my code didn't need them. We could certainly add them for completeness. Note that I'm not usually a fan of shadowing variables like this, but avoiding the import seemed like a win. (In reply to comment #4) > Another quesiton to ask... why do some parts of the code need popen? Should we be providing more limited APIs with Executive instead of adding popen? The callers are using popen() to start (and subsequently stop) processes (apache, lighttpd, the python websocket server). We probably don't need the full generality of popen(), but, annoyingly, all three processes need different sets of arguments, so we end up needing at least some of popen.
Dirk Pranke
Comment 6 2011-06-07 16:57:47 PDT
(In reply to comment #5) > > > Tools/Scripts/webkitpy/common/system/executive.py:107 > > > + PIPE = subprocess.PIPE > > > + STDOUT = subprocess.STDOUT > > > > I'm not sure this bit is super useful. Especially since we don't ahve STDERR and STDIN there. > > These are useful insofar as they allow me to not have to import subprocess directly. STDERR and STDIN aren't there because my code didn't need them. We could certainly add them for completeness. > Oh, er, also because they don't exist :) PIPE and STDOUT are the only two constants in the subprocess interface.
Dirk Pranke
Comment 7 2011-06-07 16:58:31 PDT
Note You need to log in before you can comment on or make changes to this bug.