eric6/DebugClients/Python/DebugClientBase.py

branch
multi_processing
changeset 7390
052ce4cf06c6
parent 7377
cc920e534ac0
child 7392
b6674724612a
--- 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:

eric ide

mercurial