[Patches] [ python-Patches-838546 ] make pty.fork() allocate a controlling tty

SourceForge.net noreply at sourceforge.net
Mon Nov 10 20:03:54 EST 2003


Patches item #838546, was opened at 2003-11-08 14:21
Message generated for change (Comment added) made by raynorj
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=838546&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: J Raynor (raynorj)
Assigned to: Nobody/Anonymous (nobody)
Summary: make pty.fork() allocate a controlling tty

Initial Comment:

pty.fork() does not allocate a controlling tty on
systems that don't have os.forkpty().  The code for
pty.fork() tries to use os.forkpty(), and if it isn't
available, then it tries to do its work in python, but
it doesn't work.

The code does setup stdin, stdout, and stderr to use
the slave device, but it needs to do an explicit open
on the slave device to make it become a controlling tty.

This patch is against pty.py from python 2.3, but the
same change can be made to pty.py from python 2.2 and
it works there.



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

>Comment By: J Raynor (raynorj)
Date: 2003-11-10 19:03

Message:
Logged In: YES 
user_id=904832


This works on aix 5.2, 5.1, and 4.3.3.  It also works on
hpux 10.20.


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

Comment By: Martin v. Löwis (loewis)
Date: 2003-11-10 00:38

Message:
Logged In: YES 
user_id=21627

What systems did you test this on? I remember ttyname
returning funny things on some systems.

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

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



More information about the Patches mailing list