j'ai oublié de publier ceci pour la résolution du bug 649

This commit is contained in:
Guillaume Raffy 2014-06-19 16:15:11 +00:00
parent d23c25ba06
commit 1e6a5247d8
1 changed files with 2 additions and 1 deletions

View File

@ -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)