Author martin.panter
Recipients Cornelius Diekmann, martin.panter
Date 2016-12-24.01:25:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482542723.6.0.616411308802.issue29054@psf.upfronthosting.co.za>
In-reply-to
Content
This is a change in behaviour of the _copy() loop: it will stop as soon as EOF is read from the parent’s input, and immediately close the terminal master. Unpatched, the loop continues to read output from the child, until the child closes the terminal slave.

I agree that your new behaviour may be desired in some cases, but you need to respect backwards compatibility. With your patch, things will no longer work robustly when the child “has the last word”, i.e. it writes output and exits without reading any (extra) input. Simple example: the child prints a message, but the parent has no input:

python -c 'import pty; pty.spawn("./message.py")' < /dev/null

Any new functionality would also need documenting. (If you want to suggest some wording to document the existing behaviour better, that would also be welcome :)
History
Date User Action Args
2016-12-24 01:25:23martin.pantersetrecipients: + martin.panter, Cornelius Diekmann
2016-12-24 01:25:23martin.pantersetmessageid: <1482542723.6.0.616411308802.issue29054@psf.upfronthosting.co.za>
2016-12-24 01:25:23martin.panterlinkissue29054 messages
2016-12-24 01:25:20martin.pantercreate