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.

Author xdegaye
Recipients Arfrever, amaury.forgeotdarc, exarkun, gvanrossum, marcio, marduk, martin.panter, ocean-city, pitrou, xdegaye, zmedico
Date 2015-10-08.15:34:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444318461.12.0.0251922423267.issue5380@psf.upfronthosting.co.za>
In-reply-to
Content
TLPI (The Linux Programming Interface book) says about the pty implementation on linux, at section 5 of chapter 64:

    If we close all file descriptors referring to the pseudoterminal slave, then:
    a) A read() from the master device fails with the error EIO. (On some other UNIX implementations, a read() returns end-of-file in this case.)

and also adds this (which is slightly off topic here):

    b)  A write() to the master device succeeds, unless the input queue of the slave device is full, in which case the write() blocks. If the slave device is subsequently reopened, these bytes can be read.

    UNIX implementations vary widely in their behavior for the last case. On some UNIX implementations, write() fails with the error EIO. On other implementations, write() succeeds, but the output bytes are discarded (i.e., they can’t be read if the slave is reopened). In general, these variations don’t present a problem. Normally, the process on the master side detects that the slave has been closed because a read() from the master returns end-of-file or fails. At this point, the process performs no further writes to the master.
History
Date User Action Args
2015-10-08 15:34:21xdegayesetrecipients: + xdegaye, gvanrossum, exarkun, amaury.forgeotdarc, pitrou, ocean-city, Arfrever, marduk, zmedico, marcio, martin.panter
2015-10-08 15:34:21xdegayesetmessageid: <1444318461.12.0.0251922423267.issue5380@psf.upfronthosting.co.za>
2015-10-08 15:34:21xdegayelinkissue5380 messages
2015-10-08 15:34:20xdegayecreate