Revision: 717
Author: keith.dart
Date: Thu May 2 02:52:50 2013
Log: Remove debugger hook on subprocess.
http://code.google.com/p/pycopia/source/detail?r=717
Modified:
/trunk/process/pycopia/proctools.py
=======================================
--- /trunk/process/pycopia/proctools.py Mon Apr 29 14:30:06 2013
+++ /trunk/process/pycopia/proctools.py Thu May 2 02:52:50 2013
@@ -696,8 +696,10 @@
def __init__(self, pwent=None, _pgid=0):
Process.__init__(self, sys.argv[0])
pid = os.fork()
- if pid == 0 and pwent:
- run_as(pwent)
+ if pid == 0:
+ sys.excepthook = sys.__excepthook__ # remove any debugger hook
+ if pwent:
+ run_as(pwent)
self.childpid = pid
self.childpid2 = None # for compatibility with pipeline