--- a/util/ProcessLogger.py Thu Apr 28 12:58:58 2016 +0300
+++ b/util/ProcessLogger.py Thu Apr 28 13:05:57 2016 +0300
@@ -49,11 +49,12 @@
def run(self):
outchunk = None
self.retval = None
- while outchunk != '' and not self.killed :
- outchunk = self.fd.readline()
- if self.callback : self.callback(outchunk)
while self.retval is None and not self.killed :
- self.retval = self.Proc.poll()
+ if self.endcallback:
+ self.retval = self.Proc.poll()
+ else:
+ self.retval = self.Proc.returncode
+
outchunk = self.fd.readline()
if self.callback : self.callback(outchunk)
while outchunk != '' and not self.killed :
@@ -205,5 +206,7 @@
def spin(self):
self.finishsem.acquire()
+ self.outt.join()
+ self.errt.join()
return [self.exitcode, "".join(self.outdata), "".join(self.errdata)]