Added a todo comment. multi_processing

Sun, 02 Feb 2020 19:29:56 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Feb 2020 19:29:56 +0100
branch
multi_processing
changeset 7390
052ce4cf06c6
parent 7389
770ffcb88be5
child 7392
b6674724612a

Added a todo comment.

eric6/DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
eric6/DebugClients/Python/ThreadExtension.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebugServer.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
--- a/eric6/DebugClients/Python/DebugClientBase.py	Sun Feb 02 16:41:40 2020 +0100
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Sun Feb 02 19:29:56 2020 +0100
@@ -1318,7 +1318,12 @@
         
         self.__debuggerId = "{0}-{1}".format(socket.gethostname(), os.getpid())
         
-        self.readstream = AsyncFile(sock, sys.stdin.mode, sys.stdin.name)
+        name = sys.stdin.name
+        # Special case if in a multiprocessing.Process
+        if isinstance(name, int):
+            name = '<stdin>'
+        
+        self.readstream = AsyncFile(sock, sys.stdin.mode, name)
         self.writestream = AsyncFile(sock, sys.stdout.mode, sys.stdout.name)
         self.errorstream = AsyncFile(sock, sys.stderr.mode, sys.stderr.name)
         
@@ -2009,7 +2014,6 @@
         @param redirect flag indicating redirection of stdin, stdout and
             stderr (boolean)
         """
-        global debugClient
         if host is None:
             host = os.getenv('ERICHOST', 'localhost')
         if port is None:
--- a/eric6/DebugClients/Python/ThreadExtension.py	Sun Feb 02 16:41:40 2020 +0100
+++ b/eric6/DebugClients/Python/ThreadExtension.py	Sun Feb 02 19:29:56 2020 +0100
@@ -27,7 +27,7 @@
     """
     Class implementing the thread support for the debugger.
     
-    Provides methods for intercepting thread creation, retriving the running
+    Provides methods for intercepting thread creation, retrieving the running
     threads and their name and state.
     """
     def __init__(self):
--- a/eric6/Debugger/DebugServer.py	Sun Feb 02 16:41:40 2020 +0100
+++ b/eric6/Debugger/DebugServer.py	Sun Feb 02 19:29:56 2020 +0100
@@ -1792,6 +1792,7 @@
         """
         Public method to process the last client exit event.
         """
+        # TODO: Why is this not called anymore?
         if self.passive:
             self.__passiveShutDown()
         self.lastClientExited.emit()
@@ -2059,7 +2060,7 @@
         self.debugging = False
         self.running = False
     
-    def passiveStartUp(self, fn, exc):
+    def passiveStartUp(self, fn, exc, debuggerId):
         """
         Public method to handle a passive debug connection.
         
@@ -2067,6 +2068,8 @@
         @type str
         @param exc flag to enable exception reporting of the IDE
         @type bool
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         self.appendStdout.emit(self.tr("Passive debug connection received\n"))
         self.passiveClientExited = False
--- a/eric6/Debugger/DebuggerInterfacePython.py	Sun Feb 02 16:41:40 2020 +0100
+++ b/eric6/Debugger/DebuggerInterfacePython.py	Sun Feb 02 19:29:56 2020 +0100
@@ -1457,7 +1457,8 @@
         
         elif method == "PassiveStartup":
             self.debugServer.passiveStartUp(
-                self.translate(params["filename"], True), params["exceptions"])
+                self.translate(params["filename"], True), params["exceptions"],
+                params["debuggerId"])
         
         elif method == "ResponseCompletion":
             if params["debuggerId"] == self.__master:

eric ide

mercurial