[issue17824] pty.spawn handles errors improperly

2017-01-12 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue17824] pty.spawn handles errors improperly

2017-01-12 Thread Martin Panter
Martin Panter added the comment: 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?

[issue17824] pty.spawn handles errors improperly

2015-10-06 Thread Martin Panter
Martin Panter added the comment: 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 excep

[issue17824] pty.spawn handles errors improperly

2014-10-02 Thread Mark Lawrence
Mark Lawrence added the comment: Can a linux guru comment on this please. -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker ___ _

[issue17824] pty.spawn handles errors improperly

2013-04-23 Thread Gustavo Niemeyer
New submission from Gustavo Niemeyer: 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 -- components: Library (Lib) messages: 18768