Leonardo Taccari <[email protected]> added the comment:
After testing is_valid_fd() (from Python/pylifecycle.c) separately
(an `is_valid_fd.c' file will be attached to ease reproduction) I think
that also NetBSD is affected by bpo-30225.
Using dup(2) (at is currently done in NetBSD):
% cc -o ivf is_valid_fd.c
% sleep 5 && ./ivf > /tmp/log & exit
[... the terminal is closed via ^D ...]
% cat /tmp/log
0: 1
1: 1
2: 1
Using fstat(2):
% cc -DUSE_FSTAT -o ivf is_valid_fd.c
% sleep 5 && ./ivf > /tmp/log & exit
[... the terminal is closed via ^D ...]
% cat /tmp/log
0: 0
1: 1
2: 0
The possible attached patch seems to fix the problem reported by Martin.
----------
Added file: https://bugs.python.org/file47604/patch-Python_pylifecycle.c
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33384>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com