import sys, os
from subproc import Subprocess, RecordFile
-# This is to catch 'close failed: [Errno 9] Bad file descriptor'
-# message from os.close() in Subprocess.die().
+# This is to catch 'close failed: [Errno 9] Bad file descriptor' message
+# from os.close() in Subprocess.die().
sys.stderr = open("err.log", 'w')
check_subp = None
global check_subp, subp_pipe
stop_subp(log)
- check_subp = Subprocess("%s/Robots/bkmk_rforking_sub.py" % os.path.dirname(sys.argv[0]))
+ check_subp = Subprocess("%s/Robots/bkmk_rforking_sub.py" % os.path.dirname(sys.argv[0]),
+ control_stderr=True)
subp_pipe = RecordFile(check_subp)
bookmark.parent = save_parent
+ while True:
+ error = check_subp.readPendingErrLine()
+ if not error:
+ break
+ sys.stderr.write(error)
+
except KeyboardInterrupt:
return 0