This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年04月24日 02:59 by niemeyer, last changed 2022年04月11日 14:57 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg187681 - (view) | Author: Gustavo Niemeyer (niemeyer) * (Python committer) | Date: 2013年04月24日 02:59 | |
This simple script will spawn N Python interpreters that aren't properly collected due to the improper error handling: import pty for i in range(N): try: pty.spawn(["/non-existent"]) except: pass |
|||
| msg228264 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年10月02日 22:09 | |
Can a linux guru comment on this please. |
|||
| msg252445 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年10月07日 02:20 | |
The spawn() function has this code outside of any error handler: pid, master_fd = fork() if pid == CHILD: os.execlp(argv[0], *argv) If fork() succeeds, there will actually be a parent Python process and a child Python process. If exec() then fails, an exception will escape the spawn() function in the child process, while the parent process will carry on as if all is well. Maybe it would be worthwhile studying how the "subprocess" module handles exec() failure in the child process. |
|||
| msg285300 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2017年01月12日 10:48 | |
The patch for Issue 26228 proposes an improvement to the situation, although it is not perfect and does not include a test. I wonder if it is possible to replace fork() and execlp() with a subprocess.Popen invokation, at least in a new Python release? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:44 | admin | set | github: 62024 |
| 2017年01月12日 21:01:10 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2017年01月12日 10:48:45 | martin.panter | set | messages: + msg285300 |
| 2015年10月07日 02:20:17 | martin.panter | set | nosy:
+ martin.panter messages: + msg252445 stage: needs patch |
| 2014年10月02日 22:09:38 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg228264 versions: + Python 2.7, Python 3.4, Python 3.5, - Python 3.3 |
| 2013年04月24日 02:59:30 | niemeyer | create | |