summaryrefslogtreecommitdiff
path: root/scripts/Expect.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-11-29 18:32:58 +0100
committerBenoit Foucher <benoit@zeroc.com>2012-11-29 18:32:58 +0100
commited02d2c0e41472e865f2075ab617d579383c356a (patch)
treedc67660db7649ad1d562254edbce45401e4df828 /scripts/Expect.py
parentFixed (ICE-5022) - C# Glacier2/sessionHelper test failure on Windows Server 2... (diff)
downloadice-ed02d2c0e41472e865f2075ab617d579383c356a.tar.bz2
ice-ed02d2c0e41472e865f2075ab617d579383c356a.tar.xz
ice-ed02d2c0e41472e865f2075ab617d579383c356a.zip
Fixed ICE-5050 - Except.py issue on Windows where process couldn't be terminated
Diffstat (limited to 'scripts/Expect.py')
-rwxr-xr-xscripts/Expect.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Expect.py b/scripts/Expect.py
index 2515d57edc1..f7eafd8cc95 100755
--- a/scripts/Expect.py
+++ b/scripts/Expect.py
@@ -335,11 +335,12 @@ class Expect (object):
#
# universal_newlines = True is necessary for Python 3 on Windows
#
- # We set shell=True to make sure executables are correctly searched
- # in directories specified by the PATH environment variable.
+ # We can't use shell=True because terminate() wouldn't
+ # work. This means the PATH isn't searched for the
+ # command.
#
CREATE_NEW_PROCESS_GROUP = 512
- self.p = subprocess.Popen(command, env = env, cwd = cwd, shell=True, bufsize=0, stdin=subprocess.PIPE,
+ self.p = subprocess.Popen(command, env = env, cwd = cwd, shell=False, bufsize=0, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
creationflags = CREATE_NEW_PROCESS_GROUP, universal_newlines=True)
else: