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.

classification
Title: fix to pty.spawn error on Linux
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, rasjidw
Priority: normal Keywords: patch

Created on 2002-07-15 14:34 by rasjidw, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-pty.py rasjidw, 2002-07-15 14:34 Patch to fix pty.spawn (on Linux RH 7.3)
ptypatch2 rasjidw, 2002-07-27 07:54 Revised patch to pty.py
Messages (3)
msg40593 - (view) Author: Rasjid Wilcox (rasjidw) Date: 2002-07-15 14:34
I submitted a bug report, id 581698 called 'pty.spawn -
wrong error caught'.

System: RedHat Linux 7.3, using Python2.

About a year ago, the final 'except' statement was
changed to catch IOError rather than just error. 
However, at least on my system, the os.read call raises
an OSError, not an IOError.  Therefore, the wrong error
type is now caught.

Patch attached.

Rasjid.
msg40594 - (view) Author: Rasjid Wilcox (rasjidw) Date: 2002-07-27 07:54
Logged In: YES 
user_id=39640

Actually, a bit more testing revealed some more errors when
the main process had its standard input and output something
other than a tty.

I attach my second version of the patch.

Rasjid.
msg40595 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-07-28 09:43
Logged In: YES 
user_id=21627

Thanks for the patch. Committed (in a slightly modified
form) as pty.py 1.12.
History
Date User Action Args
2022-04-10 16:05:30adminsetgithub: 36898
2002-07-15 14:34:48rasjidwcreate