Anonymous avatar Anonymous committed 9a8a280 Merge

branch merge

Comments (0)

Files changed (2)

+Changes in @NEW@:
+    * epdb will automatically switch to the process group with session control,
+      so that in programs where setpgrp() has been called, such processes 
+      can still be debugged.
 Changes in 0.9.1:
     * until now works with filenames
     * breakpoints/etc that take filenames will also now take sys.module entries, e.g. foo.bar, if sys.modules['foo.bar'] exists.
     # and restore stdout when done
     __old_stdin  = None
     __old_stdout = None
+    __old_pgid = None
     _displayList = {}
     # used to track the number of times a set_trace has been seen
     trace_counts = {'default' : [ True, 0 ]}
     def switch_input_output(self):
         self.switch_stdout()
         self.switch_stdin()
+        self.switch_pgid()
 
     def restore_input_output(self):
         if not self.__old_stdout is None:
             sys.stdout = self.__old_stdout
         if not self.__old_stdin is None:
             sys.stdin = self.__old_stdin
+        if self.__old_pgid is not None:
+	    os.setpgid(0, self.__old_pgid)
+
+    def switch_pgid(self):
+	if os.getpgrp() != os.tcgetpgrp(0):
+	    self.__old_pgid = os.getpgrp()
+            os.setpgid(0, os.tcgetpgrp(0))
+        else:
+            self.__old_stdout = None
 
     def switch_stdout(self):
         isatty = False
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.