New submission from Marcel Plch <mp...@redhat.com>:
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 ---------- components: Library (Lib) files: script.py messages: 324508 nosy: Dormouse759 priority: normal severity: normal status: open title: pipe read sometimmes returns EOF but returncode is still None versions: Python 3.8 Added file: https://bugs.python.org/file47782/script.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34566> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com