Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 1160650 - Backport bug 950894 to mozharness' version of mozproces…
Browse files Browse the repository at this point in the history
…s to avoid the issue for those running mozharness on windows with python >= 2.7.6;r=ahal

--HG--
branch : production
  • Loading branch information
chmanchester committed May 1, 2015
1 parent 5976f32 commit e7e9a30
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions mozprocess/processhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,23 @@ def wait(self):

if isWin:
# Redefine the execute child so that we can track process groups
def _execute_child(self, args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines, startupinfo,
creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite):
def _execute_child(self, *args_tuple):
# workaround for bug 950894
if sys.hexversion < 0x02070600: # prior to 2.7.6
(args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines, startupinfo,
creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite) = args_tuple
to_close = set()
else: # 2.7.6 and later
(args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines, startupinfo,
creationflags, shell, to_close,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite) = args_tuple
if not isinstance(args, basestring):
args = subprocess.list2cmdline(args)

Expand Down

0 comments on commit e7e9a30

Please sign in to comment.