src/eric7/DebugClients/Python/MultiProcessDebugExtension.py

branch
eric7
changeset 9586
2750e76fc366
parent 9571
0e2ab682dfa3
child 9653
e67609152c5e
equal deleted inserted replaced
9585:2b4bbdaa0ff9 9586:2750e76fc366
69 69
70 def newExecl(path, *args): 70 def newExecl(path, *args):
71 """ 71 """
72 Function replacing the 'execl' functions of the os module. 72 Function replacing the 'execl' functions of the os module.
73 """ 73 """
74 if _shallPatch(): 74 if _shallPatch() and isPythonProgram(args[0]):
75 if isPythonProgram(args[0]): 75 args = patchArguments(_debugClient, args)
76 args = patchArguments(_debugClient, args) 76 path = args[0]
77 path = args[0]
78 return getattr(os, originalName)(path, *args) 77 return getattr(os, originalName)(path, *args)
79 78
80 return newExecl 79 return newExecl
81 80
82 81
97 96
98 def newExecv(path, args): 97 def newExecv(path, args):
99 """ 98 """
100 Function replacing the 'execv' functions of the os module. 99 Function replacing the 'execv' functions of the os module.
101 """ 100 """
102 if _shallPatch(): 101 if _shallPatch() and isPythonProgram(args[0]):
103 if isPythonProgram(args[0]): 102 args = patchArguments(_debugClient, args)
104 args = patchArguments(_debugClient, args) 103 path = args[0]
105 path = args[0]
106 return getattr(os, originalName)(path, args) 104 return getattr(os, originalName)(path, args)
107 105
108 return newExecv 106 return newExecv
109 107
110 108
125 123
126 def newExecve(path, args, env): 124 def newExecve(path, args, env):
127 """ 125 """
128 Function replacing the 'execve' functions of the os module. 126 Function replacing the 'execve' functions of the os module.
129 """ 127 """
130 if _shallPatch(): 128 if _shallPatch() and isPythonProgram(args[0]):
131 if isPythonProgram(args[0]): 129 args = patchArguments(_debugClient, args)
132 args = patchArguments(_debugClient, args) 130 path = args[0]
133 path = args[0]
134 return getattr(os, originalName)(path, args, env) 131 return getattr(os, originalName)(path, args, env)
135 132
136 return newExecve 133 return newExecve
137 134
138 135

eric ide

mercurial