From 1e6a5247d8b0af4ef36b651655d8f327610e6ef0 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Thu, 19 Jun 2014 16:15:11 +0000 Subject: [PATCH] =?UTF-8?q?j'ai=20oubli=C3=A9=20de=20publier=20ceci=20pour?= =?UTF-8?q?=20la=20r=C3=A9solution=20du=20bug=20649?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)