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.

Title: openpty does not give bidirectional pipe
Type: behavior Stage:
Components: None Versions: Python 2.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: mudyc
Priority: normal Keywords:

Created on 2007-10-05 08:10 by mudyc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg56235 - (view) Author: Matti Katila (mudyc) Date: 2007-10-05 08:12
msg56236 - (view) Author: Matti Katila (mudyc) Date: 2007-10-05 08:50
Linux Programmer’s Manual for ptmx and pts - pseudo-terminal master and
slave states:

"Data written to the slave is presented  on  the  master descriptor  as
input. Data written to the master is presented to the slave as input."

The data can be read from slave to master but not from master to slave.

The unit test does not test this issue either:
msg56248 - (view) Author: Matti Katila (mudyc) Date: 2007-10-05 20:52
Not a real issue - it's a standard behaviour of tty.

Fix is to set -icanon:

m,s = os.openpty()
s = os.ttyname(s)
os.system( 'stty cs8 -icanon -echo < %s' % s )


The issue can be closed and documentation can be updated with some
helpful information.
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45580
2008-01-12 03:23:37christian.heimessetstatus: open -> closed
resolution: not a bug
2007-10-05 20:52:15mudycsetmessages: + msg56248
2007-10-05 08:50:58mudycsetmessages: + msg56236
2007-10-05 08:12:27mudycsetnosy: + mudyc
messages: + msg56235
2007-10-05 08:10:34mudyccreate