Message324508
TL;DR: For reproducer, please see attached file and the end of this description for a runner script.
It seems that when pipe is being read it has a chance of returning EOF and not setting the return code.
This bug affects all (or at least a broad set of) architectures and is present in all versions. (2.7 and 3.8 were tested).
This bug is not reproducible when configured using --with-pydebug flag.
As a result, any code relying on proper setting of the returncode attribute might (and probably is going to) fail.
-----------
$ for i in $(seq 1 1000); do ./python script.py; done | grep poll | sort | uniq -c
Actual output:
630 output: '', return code: 0, pollstatus=0
370 output: '', return code: None, pollstatus=None
Expected output:
1000 output: '', return code: 0, pollstatus=0 |
|
Date |
User |
Action |
Args |
2018-09-03 12:06:40 | Dormouse759 | set | recipients:
+ Dormouse759 |
2018-09-03 12:06:40 | Dormouse759 | set | messageid: <1535976400.44.0.56676864532.issue34566@psf.upfronthosting.co.za> |
2018-09-03 12:06:40 | Dormouse759 | link | issue34566 messages |
2018-09-03 12:06:40 | Dormouse759 | create | |
|