2355 Public method implementing a fork routine deciding which branch |
2355 Public method implementing a fork routine deciding which branch |
2356 to follow. |
2356 to follow. |
2357 |
2357 |
2358 @return process ID (integer) |
2358 @return process ID (integer) |
2359 """ |
2359 """ |
2360 if not self.fork_auto: |
2360 ## if not self.fork_auto: |
2361 self.sendJsonCommand("RequestForkTo", {}) |
2361 ## self.sendJsonCommand("RequestForkTo", {}) |
2362 self.eventLoop(True) |
2362 ## self.eventLoop(True) |
2363 pid = DebugClientOrigFork() |
2363 pid = DebugClientOrigFork() |
2364 if pid == 0: |
2364 if pid == 0: |
2365 # child |
2365 # child |
2366 if not self.fork_child: |
2366 ## if not self.fork_child: |
2367 sys.settrace(None) |
2367 sys.settrace(None) |
2368 sys.setprofile(None) |
2368 sys.setprofile(None) |
2369 self.sessionClose(False) |
2369 self.sessionClose(False) |
2370 ## (wd, host, port, exceptions, tracePython, redirect, |
2370 ## (wd, host, port, exceptions, tracePython, redirect, |
2371 ## noencoding, fork_auto, fork_child) = self.startOptions |
2371 ## noencoding, fork_auto, fork_child) = self.startOptions |
2372 ## self.startDebugger(sys.argv[0], host, port, |
2372 ## self.startDebugger(sys.argv[0], host, port, |
2373 ## exceptions=exceptions, |
2373 ## exceptions=exceptions, |
2374 ## tracePython=tracePython, |
2374 ## tracePython=tracePython, |