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(): |
75 args = patchArguments(_debugClient, args) |
|
76 if isPythonProgram(args[0]): |
75 if isPythonProgram(args[0]): |
|
76 args = patchArguments(_debugClient, args) |
77 path = args[0] |
77 path = args[0] |
78 return getattr(os, originalName)(path, *args) |
78 return getattr(os, originalName)(path, *args) |
79 |
79 |
80 return newExecl |
80 return newExecl |
81 |
81 |
98 def newExecv(path, args): |
98 def newExecv(path, args): |
99 """ |
99 """ |
100 Function replacing the 'execv' functions of the os module. |
100 Function replacing the 'execv' functions of the os module. |
101 """ |
101 """ |
102 if _shallPatch(): |
102 if _shallPatch(): |
103 args = patchArguments(_debugClient, args) |
|
104 if isPythonProgram(args[0]): |
103 if isPythonProgram(args[0]): |
|
104 args = patchArguments(_debugClient, args) |
105 path = args[0] |
105 path = args[0] |
106 return getattr(os, originalName)(path, args) |
106 return getattr(os, originalName)(path, args) |
107 |
107 |
108 return newExecv |
108 return newExecv |
109 |
109 |
126 def newExecve(path, args, env): |
126 def newExecve(path, args, env): |
127 """ |
127 """ |
128 Function replacing the 'execve' functions of the os module. |
128 Function replacing the 'execve' functions of the os module. |
129 """ |
129 """ |
130 if _shallPatch(): |
130 if _shallPatch(): |
131 args = patchArguments(_debugClient, args) |
|
132 if isPythonProgram(args[0]): |
131 if isPythonProgram(args[0]): |
|
132 args = patchArguments(_debugClient, args) |
133 path = args[0] |
133 path = args[0] |
134 return getattr(os, originalName)(path, args, env) |
134 return getattr(os, originalName)(path, args, env) |
135 |
135 |
136 return newExecve |
136 return newExecve |
137 |
137 |