[ python-Feature Requests-967161 ] pty.spawn() enhancements

SourceForge.net noreply at sourceforge.net
Wed Jun 9 10:16:54 EDT 2004


Feature Requests item #967161, was opened at 2004-06-06 00:29
Message generated for change (Comment added) made by jhenstridge
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=967161&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: A.M. Kuchling (akuchling)
Assigned to: Nobody/Anonymous (nobody)
Summary: pty.spawn() enhancements

Initial Comment:
(Originally suggested by James Henstridge in bug #897935)

There are also a few changes that would be nice to see
in pty.spawn:

1) get the exit status of the child. Could be fixed by
adding the following to the end of the function:
pid, status = os.waitpid(pid, 0)
return status

2) set master_fd to non-blocking mode, so that the
output is printed to the screen at the speed it is
produced by the child.


----------------------------------------------------------------------

Comment By: James Henstridge (jhenstridge)
Date: 2004-06-09 22:16

Message:
Logged In: YES 
user_id=146903

Since filing the original bug report, I got reports that
simply setting the fds to non-blocking caused problems under
Solaris.  Some details are available in this bug report:

http://bugzilla.gnome.org/show_bug.cgi?id=139168

The _copy() function never raised an IOError or OSError, so
it never exited.  I'd imagine that EOF could be detected by
getting back then empty string when reading from the fd when
select() says it is ready for reading, but I haven't checked
whether this works.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=967161&group_id=5470



More information about the Python-bugs-list mailing list