Message283912
| 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:23 | martin.panter | set | recipients:
+ martin.panter, Cornelius Diekmann |
| 2016年12月24日 01:25:23 | martin.panter | set | messageid: <1482542723.6.0.616411308802.issue29054@psf.upfronthosting.co.za> |
| 2016年12月24日 01:25:23 | martin.panter | link | issue29054 messages |
| 2016年12月24日 01:25:20 | martin.panter | create |
|