Author leot
Recipients MartinHusemann, leot, wiz, xdegaye
Date 2018-05-19.14:45:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526741148.4.0.682650639539.issue33384@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-05-19 14:45:48leotsetrecipients: + leot, wiz, xdegaye, MartinHusemann
2018-05-19 14:45:48leotsetmessageid: <1526741148.4.0.682650639539.issue33384@psf.upfronthosting.co.za>
2018-05-19 14:45:48leotlinkissue33384 messages
2018-05-19 14:45:48leotcreate