Commit 7b90c852 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Run python Popen subprocesses through the private copy of bash

instead of the default /bin/sh (CORALCOOL-2884)


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19963 4525493e-7705-40b1-a816-d608a930855b
parent dc39d71b
......@@ -260,8 +260,13 @@ class DBPreparer:
devnull = "nul"
message = "DropDB (coolDropDB %s)"%self.ConnectionString()
###sys.stdout.write("-> DROPDB...\n")
###dropDB = Popen("coolDropDB %s > %s"%(self.ConnectionString(),devnull), stdout=PIPE, stderr=PIPE, shell=True)
dropDB = Popen("coolDropDB %s"%(self.ConnectionString()), stdout=PIPE, stderr=STDOUT, shell=True) # AV dump output if it fails (bug #91006)
if platform.system() == 'Darwin':
# Workaround for SIP on MacOSX (CORALCOOL-2884)
# Use own copy of /bin/bash instead of defult /bin/sh
dropDB = Popen("coolDropDB %s"%(self.ConnectionString()), stdout=PIPE, stderr=STDOUT, shell=True, executable="bash")
else:
###dropDB = Popen("coolDropDB %s > %s"%(self.ConnectionString(),devnull), stdout=PIPE, stderr=PIPE, shell=True)
dropDB = Popen("coolDropDB %s"%(self.ConnectionString()), stdout=PIPE, stderr=STDOUT, shell=True) # AV dump output if it fails (bug #91006)
start_time = time()
while dropDB.poll() is None:
if (time()-start_time) > self._DropDBTimeOut:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment