[ python-Feature Requests-967161 ] pty.spawn() enhancements
SourceForge.net
noreply at sourceforge.net
Fri Mar 16 07:08:36 CET 2007
Feature Requests item #967161, was opened at 2004-06-05 09:29
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=967161&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
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: Neal Norwitz (nnorwitz)
Date: 2007-03-15 23:08
Message:
Logged In: YES
user_id=33168
Originator: NO
Wouldn't it be better to just return the pid. The caller can get the
status if they want or do anything else with the pid. I'm guessing #2 is
no longer requested?
----------------------------------------------------------------------
Comment By: James Henstridge (jhenstridge)
Date: 2004-06-09 07: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