diff --git a/Util.py b/Util.py index 4580644..494c94e 100644 --- a/Util.py +++ b/Util.py @@ -49,7 +49,8 @@ def executeCommand( command ): """ executes the shell command such as 'set x=1; myprog $x' """ - popen = subprocess.Popen( [ command ], bufsize=1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) # bufsize=1 seems to prevent deadlocks that happen 50% the time + popen = subprocess.Popen( [ command ], bufsize=1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, executable = '/bin/bash' ) # bufsize=1 seems to prevent deadlocks that happen 50% the time + # if we don't specify the optional executable argument, then the default non interactive shell will be used. On debian, the default non-interactive shell is dash, which doesn't understand the keyword 'source' that we use in many places stdout, stderr = popen.communicate() #popen.wait() result = (popen.returncode, stdout, stderr)