eric6/Documentation/Source/eric6.DebugClients.Python.MultiProcessDebugExtension.html

changeset 7890
c7b98271f551
child 7989
a21d673a8f99
equal deleted inserted replaced
7889:c6af59ed8c17 7890:c7b98271f551
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.DebugClients.Python.MultiProcessDebugExtension</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric6.DebugClients.Python.MultiProcessDebugExtension</h1>
24
25 <p>
26 Module implementing a function to patch the process creation functions to
27 support multiprocess debugging.
28 </p>
29 <h3>Global Attributes</h3>
30
31 <table>
32 <tr><td>_debugClient</td></tr>
33 </table>
34 <h3>Classes</h3>
35
36 <table>
37 <tr><td>None</td></tr>
38 </table>
39 <h3>Functions</h3>
40
41 <table>
42
43 <tr>
44 <td><a href="#_shallPatch">_shallPatch</a></td>
45 <td>Function to determine, if the multiprocessing patches should be done.</td>
46 </tr>
47 <tr>
48 <td><a href="#createCreateProcess">createCreateProcess</a></td>
49 <td>Function to patch the 'CreateProcess' process creation function of Windows.</td>
50 </tr>
51 <tr>
52 <td><a href="#createExecl">createExecl</a></td>
53 <td>Function to patch the 'execl' process creation functions.</td>
54 </tr>
55 <tr>
56 <td><a href="#createExecv">createExecv</a></td>
57 <td>Function to patch the 'execv' process creation functions.</td>
58 </tr>
59 <tr>
60 <td><a href="#createExecve">createExecve</a></td>
61 <td>Function to patch the 'execve' process creation functions.</td>
62 </tr>
63 <tr>
64 <td><a href="#createFork">createFork</a></td>
65 <td>Function to patch the 'fork' process creation functions.</td>
66 </tr>
67 <tr>
68 <td><a href="#createForkExec">createForkExec</a></td>
69 <td>Function to patch the 'fork_exec' process creation functions.</td>
70 </tr>
71 <tr>
72 <td><a href="#createPosixSpawn">createPosixSpawn</a></td>
73 <td>Function to patch the 'posix_spawn' process creation functions.</td>
74 </tr>
75 <tr>
76 <td><a href="#createSpawnl">createSpawnl</a></td>
77 <td>Function to patch the 'spawnl' process creation functions.</td>
78 </tr>
79 <tr>
80 <td><a href="#createSpawnv">createSpawnv</a></td>
81 <td>Function to patch the 'spawnv' process creation functions.</td>
82 </tr>
83 <tr>
84 <td><a href="#createSpawnve">createSpawnve</a></td>
85 <td>Function to patch the 'spawnve' process creation functions.</td>
86 </tr>
87 <tr>
88 <td><a href="#newCreateProcess">newCreateProcess</a></td>
89 <td>Function replacing the 'CreateProcess' function of the _subprocess or _winapi module.</td>
90 </tr>
91 <tr>
92 <td><a href="#newExecl">newExecl</a></td>
93 <td>Function replacing the 'execl' functions of the os module.</td>
94 </tr>
95 <tr>
96 <td><a href="#newExecv">newExecv</a></td>
97 <td>Function replacing the 'execv' functions of the os module.</td>
98 </tr>
99 <tr>
100 <td><a href="#newExecve">newExecve</a></td>
101 <td>Function replacing the 'execve' functions of the os module.</td>
102 </tr>
103 <tr>
104 <td><a href="#newFork">newFork</a></td>
105 <td>Function replacing the 'fork' function of the os module.</td>
106 </tr>
107 <tr>
108 <td><a href="#newForkExec">newForkExec</a></td>
109 <td>Function replacing the 'fork_exec' functions of the _posixsubprocess module.</td>
110 </tr>
111 <tr>
112 <td><a href="#newPosixSpawn">newPosixSpawn</a></td>
113 <td>Function replacing the 'posix_spawn' functions of the os module.</td>
114 </tr>
115 <tr>
116 <td><a href="#newSpawnl">newSpawnl</a></td>
117 <td>Function replacing the 'spawnl' functions of the os module.</td>
118 </tr>
119 <tr>
120 <td><a href="#newSpawnv">newSpawnv</a></td>
121 <td>Function replacing the 'spawnv' functions of the os module.</td>
122 </tr>
123 <tr>
124 <td><a href="#newSpawnve">newSpawnve</a></td>
125 <td>Function replacing the 'spawnve' functions of the os module.</td>
126 </tr>
127 <tr>
128 <td><a href="#patchModule">patchModule</a></td>
129 <td>Function to replace a function of a module with a modified one.</td>
130 </tr>
131 <tr>
132 <td><a href="#patchNewProcessFunctions">patchNewProcessFunctions</a></td>
133 <td>Function to patch the process creation functions to support multiprocess debugging.</td>
134 </tr>
135 </table>
136 <hr />
137 <hr />
138 <a NAME="_shallPatch" ID="_shallPatch"></a>
139 <h2>_shallPatch</h2>
140 <b>_shallPatch</b>(<i></i>)
141
142 <p>
143 Function to determine, if the multiprocessing patches should be done.
144 </p>
145 <dl>
146 <dt>Returns:</dt>
147 <dd>
148 flag indicating patching should be performed
149 </dd>
150 </dl>
151 <dl>
152 <dt>Return Type:</dt>
153 <dd>
154 bool
155 </dd>
156 </dl>
157 <div align="right"><a href="#top">Up</a></div>
158 <hr />
159 <hr />
160 <a NAME="createCreateProcess" ID="createCreateProcess"></a>
161 <h2>createCreateProcess</h2>
162 <b>createCreateProcess</b>(<i>originalName</i>)
163
164 <p>
165 Function to patch the 'CreateProcess' process creation function of
166 Windows.
167 </p>
168 <dl>
169
170 <dt><i>originalName</i> (str)</dt>
171 <dd>
172 original name of the function to be patched
173 </dd>
174 </dl>
175 <dl>
176 <dt>Returns:</dt>
177 <dd>
178 function replacing the original one
179 </dd>
180 </dl>
181 <dl>
182 <dt>Return Type:</dt>
183 <dd>
184 function
185 </dd>
186 </dl>
187 <div align="right"><a href="#top">Up</a></div>
188 <hr />
189 <hr />
190 <a NAME="createExecl" ID="createExecl"></a>
191 <h2>createExecl</h2>
192 <b>createExecl</b>(<i>originalName</i>)
193
194 <p>
195 Function to patch the 'execl' process creation functions.
196 </p>
197 <p>
198 <ul>
199 <li>os.execl(path, arg0, arg1, ...)</li>
200 <li>os.execle(path, arg0, arg1, ..., env)</li>
201 <li>os.execlp(file, arg0, arg1, ...)</li>
202 <li>os.execlpe(file, arg0, arg1, ..., env)</li>
203 </ul>
204 </p>
205 <dl>
206
207 <dt><i>originalName</i> (str)</dt>
208 <dd>
209 original name of the function to be patched
210 </dd>
211 </dl>
212 <dl>
213 <dt>Returns:</dt>
214 <dd>
215 function replacing the original one
216 </dd>
217 </dl>
218 <dl>
219 <dt>Return Type:</dt>
220 <dd>
221 function
222 </dd>
223 </dl>
224 <div align="right"><a href="#top">Up</a></div>
225 <hr />
226 <hr />
227 <a NAME="createExecv" ID="createExecv"></a>
228 <h2>createExecv</h2>
229 <b>createExecv</b>(<i>originalName</i>)
230
231 <p>
232 Function to patch the 'execv' process creation functions.
233 </p>
234 <p>
235 <ul>
236 <li>os.execv(path, args)</li>
237 <li>os.execvp(file, args)</li>
238 </ul>
239 </p>
240 <dl>
241
242 <dt><i>originalName</i> (str)</dt>
243 <dd>
244 original name of the function to be patched
245 </dd>
246 </dl>
247 <dl>
248 <dt>Returns:</dt>
249 <dd>
250 function replacing the original one
251 </dd>
252 </dl>
253 <dl>
254 <dt>Return Type:</dt>
255 <dd>
256 function
257 </dd>
258 </dl>
259 <div align="right"><a href="#top">Up</a></div>
260 <hr />
261 <hr />
262 <a NAME="createExecve" ID="createExecve"></a>
263 <h2>createExecve</h2>
264 <b>createExecve</b>(<i>originalName</i>)
265
266 <p>
267 Function to patch the 'execve' process creation functions.
268 </p>
269 <p>
270 <ul>
271 <li>os.execve(path, args, env)</li>
272 <li>os.execvpe(file, args, env)</li>
273 </ul>
274 </p>
275 <dl>
276
277 <dt><i>originalName</i> (str)</dt>
278 <dd>
279 original name of the function to be patched
280 </dd>
281 </dl>
282 <dl>
283 <dt>Returns:</dt>
284 <dd>
285 function replacing the original one
286 </dd>
287 </dl>
288 <dl>
289 <dt>Return Type:</dt>
290 <dd>
291 function
292 </dd>
293 </dl>
294 <div align="right"><a href="#top">Up</a></div>
295 <hr />
296 <hr />
297 <a NAME="createFork" ID="createFork"></a>
298 <h2>createFork</h2>
299 <b>createFork</b>(<i>originalName</i>)
300
301 <p>
302 Function to patch the 'fork' process creation functions.
303 </p>
304 <p>
305 <ul>
306 <li>os.fork()</li>
307 </ul>
308 </p>
309 <dl>
310
311 <dt><i>originalName</i> (str)</dt>
312 <dd>
313 original name of the function to be patched
314 </dd>
315 </dl>
316 <dl>
317 <dt>Returns:</dt>
318 <dd>
319 function replacing the original one
320 </dd>
321 </dl>
322 <dl>
323 <dt>Return Type:</dt>
324 <dd>
325 function
326 </dd>
327 </dl>
328 <div align="right"><a href="#top">Up</a></div>
329 <hr />
330 <hr />
331 <a NAME="createForkExec" ID="createForkExec"></a>
332 <h2>createForkExec</h2>
333 <b>createForkExec</b>(<i>originalName</i>)
334
335 <p>
336 Function to patch the 'fork_exec' process creation functions.
337 </p>
338 <p>
339 <ul>
340 <li>_posixsubprocess.fork_exec(args, executable_list, close_fds,
341 ... (13 more))</li>
342 </ul>
343 </p>
344 <dl>
345
346 <dt><i>originalName</i> (str)</dt>
347 <dd>
348 original name of the function to be patched
349 </dd>
350 </dl>
351 <dl>
352 <dt>Returns:</dt>
353 <dd>
354 function replacing the original one
355 </dd>
356 </dl>
357 <dl>
358 <dt>Return Type:</dt>
359 <dd>
360 function
361 </dd>
362 </dl>
363 <div align="right"><a href="#top">Up</a></div>
364 <hr />
365 <hr />
366 <a NAME="createPosixSpawn" ID="createPosixSpawn"></a>
367 <h2>createPosixSpawn</h2>
368 <b>createPosixSpawn</b>(<i>originalName</i>)
369
370 <p>
371 Function to patch the 'posix_spawn' process creation functions.
372 </p>
373 <p>
374 <ul>
375 <li>os.posix_spawn(path, argv, env, *, file_actions=None, ...
376 (6 more))</li>
377 <li>os.posix_spawnp(path, argv, env, *, file_actions=None, ...
378 (6 more))</li>
379 </ul>
380 </p>
381 <dl>
382
383 <dt><i>originalName</i> (str)</dt>
384 <dd>
385 original name of the function to be patched
386 </dd>
387 </dl>
388 <dl>
389 <dt>Returns:</dt>
390 <dd>
391 function replacing the original one
392 </dd>
393 </dl>
394 <dl>
395 <dt>Return Type:</dt>
396 <dd>
397 function
398 </dd>
399 </dl>
400 <div align="right"><a href="#top">Up</a></div>
401 <hr />
402 <hr />
403 <a NAME="createSpawnl" ID="createSpawnl"></a>
404 <h2>createSpawnl</h2>
405 <b>createSpawnl</b>(<i>originalName</i>)
406
407 <p>
408 Function to patch the 'spawnl' process creation functions.
409 </p>
410 <p>
411 <ul>
412 <li>os.spawnl(mode, path, arg0, arg1, ...)</li>
413 <li>os.spawnlp(mode, file, arg0, arg1, ...)</li>
414 </ul>
415 </p>
416 <dl>
417
418 <dt><i>originalName</i> (str)</dt>
419 <dd>
420 original name of the function to be patched
421 </dd>
422 </dl>
423 <dl>
424 <dt>Returns:</dt>
425 <dd>
426 function replacing the original one
427 </dd>
428 </dl>
429 <dl>
430 <dt>Return Type:</dt>
431 <dd>
432 function
433 </dd>
434 </dl>
435 <div align="right"><a href="#top">Up</a></div>
436 <hr />
437 <hr />
438 <a NAME="createSpawnv" ID="createSpawnv"></a>
439 <h2>createSpawnv</h2>
440 <b>createSpawnv</b>(<i>originalName</i>)
441
442 <p>
443 Function to patch the 'spawnv' process creation functions.
444 </p>
445 <p>
446 <ul>
447 <li>os.spawnv(mode, path, args)</li>
448 <li>os.spawnvp(mode, file, args)</li>
449 </ul>
450 </p>
451 <dl>
452
453 <dt><i>originalName</i> (str)</dt>
454 <dd>
455 original name of the function to be patched
456 </dd>
457 </dl>
458 <dl>
459 <dt>Returns:</dt>
460 <dd>
461 function replacing the original one
462 </dd>
463 </dl>
464 <dl>
465 <dt>Return Type:</dt>
466 <dd>
467 function
468 </dd>
469 </dl>
470 <div align="right"><a href="#top">Up</a></div>
471 <hr />
472 <hr />
473 <a NAME="createSpawnve" ID="createSpawnve"></a>
474 <h2>createSpawnve</h2>
475 <b>createSpawnve</b>(<i>originalName</i>)
476
477 <p>
478 Function to patch the 'spawnve' process creation functions.
479 </p>
480 <p>
481 <ul>
482 <li>os.spawnve(mode, path, args, env)</li>
483 <li>os.spawnvpe(mode, file, args, env)</li>
484 </ul>
485 </p>
486 <dl>
487
488 <dt><i>originalName</i> (str)</dt>
489 <dd>
490 original name of the function to be patched
491 </dd>
492 </dl>
493 <dl>
494 <dt>Returns:</dt>
495 <dd>
496 function replacing the original one
497 </dd>
498 </dl>
499 <dl>
500 <dt>Return Type:</dt>
501 <dd>
502 function
503 </dd>
504 </dl>
505 <div align="right"><a href="#top">Up</a></div>
506 <hr />
507 <hr />
508 <a NAME="newCreateProcess" ID="newCreateProcess"></a>
509 <h2>newCreateProcess</h2>
510 <b>newCreateProcess</b>(<i>appName, cmdline, *args</i>)
511
512 <p>
513 Function replacing the 'CreateProcess' function of the _subprocess
514 or _winapi module.
515 </p>
516 <div align="right"><a href="#top">Up</a></div>
517 <hr />
518 <hr />
519 <a NAME="newExecl" ID="newExecl"></a>
520 <h2>newExecl</h2>
521 <b>newExecl</b>(<i>path, *args</i>)
522
523 <p>
524 Function replacing the 'execl' functions of the os module.
525 </p>
526 <div align="right"><a href="#top">Up</a></div>
527 <hr />
528 <hr />
529 <a NAME="newExecv" ID="newExecv"></a>
530 <h2>newExecv</h2>
531 <b>newExecv</b>(<i>path, args</i>)
532
533 <p>
534 Function replacing the 'execv' functions of the os module.
535 </p>
536 <div align="right"><a href="#top">Up</a></div>
537 <hr />
538 <hr />
539 <a NAME="newExecve" ID="newExecve"></a>
540 <h2>newExecve</h2>
541 <b>newExecve</b>(<i>path, args, env</i>)
542
543 <p>
544 Function replacing the 'execve' functions of the os module.
545 </p>
546 <div align="right"><a href="#top">Up</a></div>
547 <hr />
548 <hr />
549 <a NAME="newFork" ID="newFork"></a>
550 <h2>newFork</h2>
551 <b>newFork</b>(<i></i>)
552
553 <p>
554 Function replacing the 'fork' function of the os module.
555 </p>
556 <div align="right"><a href="#top">Up</a></div>
557 <hr />
558 <hr />
559 <a NAME="newForkExec" ID="newForkExec"></a>
560 <h2>newForkExec</h2>
561 <b>newForkExec</b>(<i>args, *other_args</i>)
562
563 <p>
564 Function replacing the 'fork_exec' functions of the _posixsubprocess
565 module.
566 </p>
567 <div align="right"><a href="#top">Up</a></div>
568 <hr />
569 <hr />
570 <a NAME="newPosixSpawn" ID="newPosixSpawn"></a>
571 <h2>newPosixSpawn</h2>
572 <b>newPosixSpawn</b>(<i>path, argv, env, **kwargs</i>)
573
574 <p>
575 Function replacing the 'posix_spawn' functions of the os module.
576 </p>
577 <div align="right"><a href="#top">Up</a></div>
578 <hr />
579 <hr />
580 <a NAME="newSpawnl" ID="newSpawnl"></a>
581 <h2>newSpawnl</h2>
582 <b>newSpawnl</b>(<i>mode, path, *args</i>)
583
584 <p>
585 Function replacing the 'spawnl' functions of the os module.
586 </p>
587 <div align="right"><a href="#top">Up</a></div>
588 <hr />
589 <hr />
590 <a NAME="newSpawnv" ID="newSpawnv"></a>
591 <h2>newSpawnv</h2>
592 <b>newSpawnv</b>(<i>mode, path, args</i>)
593
594 <p>
595 Function replacing the 'spawnv' functions of the os module.
596 </p>
597 <div align="right"><a href="#top">Up</a></div>
598 <hr />
599 <hr />
600 <a NAME="newSpawnve" ID="newSpawnve"></a>
601 <h2>newSpawnve</h2>
602 <b>newSpawnve</b>(<i>mode, path, args, env</i>)
603
604 <p>
605 Function replacing the 'spawnve' functions of the os module.
606 </p>
607 <div align="right"><a href="#top">Up</a></div>
608 <hr />
609 <hr />
610 <a NAME="patchModule" ID="patchModule"></a>
611 <h2>patchModule</h2>
612 <b>patchModule</b>(<i>module, functionName, createFunction</i>)
613
614 <p>
615 Function to replace a function of a module with a modified one.
616 </p>
617 <dl>
618
619 <dt><i>module</i> (types.ModuleType)</dt>
620 <dd>
621 reference to the module
622 </dd>
623 <dt><i>functionName</i> (str)</dt>
624 <dd>
625 name of the function to be replaced
626 </dd>
627 <dt><i>createFunction</i> (types.FunctionType)</dt>
628 <dd>
629 function creating the replacement
630 </dd>
631 </dl>
632 <div align="right"><a href="#top">Up</a></div>
633 <hr />
634 <hr />
635 <a NAME="patchNewProcessFunctions" ID="patchNewProcessFunctions"></a>
636 <h2>patchNewProcessFunctions</h2>
637 <b>patchNewProcessFunctions</b>(<i>multiprocessEnabled, debugClient</i>)
638
639 <p>
640 Function to patch the process creation functions to support multiprocess
641 debugging.
642 </p>
643 <dl>
644
645 <dt><i>multiprocessEnabled</i> (bool)</dt>
646 <dd>
647 flag indicating multiprocess support
648 </dd>
649 <dt><i>debugClient</i> (DebugClient)</dt>
650 <dd>
651 reference to the debug client object
652 </dd>
653 </dl>
654 <div align="right"><a href="#top">Up</a></div>
655 <hr />
656 </body></html>

eric ide

mercurial