[Python-bugs-list] [ python-Bugs-581698 ] pty.spawn - wrong error caught
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 15 Jul 2002 07:18:55 -0700
Bugs item #581698, was opened at 2002-07-16 00:18
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=581698&group_id=5470
Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Rasjid Wilcox (rasjidw)
Assigned to: Nobody/Anonymous (nobody)
Summary: pty.spawn - wrong error caught
Initial Comment:
With Python 2.2 as installed on Redhat Linux 7.3, I get
the following error with pty.spawn.
----------- test-pty.py ------------
#!/usr/bin/python2
import os, sys, pty
sp = raw_input("Spawn a new process?")
if sp == 'y':
pty.spawn(('/bin/ls', '/etc'))
a = raw_input()
print a
------------ end code ---------------
Traceback (most recent call last):
File "test-pty.py", line 7, in ?
pty.spawn(('/bin/ls', '/etc'))
File "/usr/lib/python2.2/pty.py", line 160, in spawn
_copy(master_fd, master_read, stdin_read)
File "/usr/lib/python2.2/pty.py", line 144, in _copy
data = master_read(master_fd)
File "/usr/lib/python2.2/pty.py", line 133, in _read
return os.read(fd, 1024)
OSError: [Errno 5] Input/output error
------------------------------------
I have checked the CVS version, and it looks like it
will still give the same error.
I am about to submit a 1 line patch, which as far as I
can tell fixes the problem (at least for me). See the
patches tracker.
Rasjid.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=581698&group_id=5470