Message392714
With upcoming 3.10 phasing out 2.7 compatibility I have to find a solution to this, so I'm back digging here.
Even .read(1) on a subprocess pipe causes an underlying buffered read, so working around the problem by a loop of 1-byte reads has to do with os.read(), though its usage on file-like object is discouraged.
It looks like one of those would be needed, depending on the expected semantics of `POpen`'s `bufsize` parameter:
* use the provided bufsize for the underlying buffering
* provide a dummy pipe fd through fileno(), feeding it data as long as a read() call leaves data in the underlying buffer (indeed a simple conditional 1-byte read or write to the pipe before returning to caller should provide the correct semantics) |
|
Date |
User |
Action |
Args |
2021-05-02 18:46:14 | yann | set | recipients:
+ yann |
2021-05-02 18:46:13 | yann | set | messageid: <1619981173.86.0.626727245227.issue41222@roundup.psfhosted.org> |
2021-05-02 18:46:13 | yann | link | issue41222 messages |
2021-05-02 18:46:13 | yann | create | |
|