Skip to content

Commit

Permalink
put back proc.communicate
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Jul 20, 2023
1 parent f5e1f82 commit 8cf7cf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python/WMCore/WMSpec/Steps/Executors/CMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,12 @@ def execute(self, emulator=None):

time0 = time.time()
# returnCode = subprocess.call(args, stdout=stdoutHandle, stderr=stderrHandle)
proc = psutil.Popen(args, stdout=stdoutHandle, stderr=stderrHandle)
# proc = psutil.Popen(args, stdout=stdoutHandle, stderr=stderrHandle)
proc = psutil.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
childPid, exitStatus, resource = os.wait4(proc.pid, os.P_PID)
stdout, stderr = proc.communicate()
stdoutHandle.write(str(stdout))
stderrHandle.write(str(stderr))
returnCode = proc.returncode
cpuTime = getrusage(RUSAGE_CHILDREN).ru_stime
elapsedTime = time.time()-time0
Expand Down

0 comments on commit 8cf7cf0

Please sign in to comment.