Annotation of pkgsrc/lang/python36/patches/patch-Python_pylifecycle.c, revision 1.2

1.2     ! leot        1: $NetBSD: patch-Python_pylifecycle.c,v 1.1 2019/04/09 18:47:24 adam Exp $
1.1       adam        2: 
1.2     ! leot        3: NetBSD is also affected by bpo-30225 (<https://bugs.python.org/issue30225>),
        !             4: use fstat(2) on NetBSD too.  Fixes PR pkg/53229.
        !             5: 
        !             6: Reported upstream via bpo-33384: <https://bugs.python.org/issue33384>
1.1       adam        7: 
                      8: --- Python/pylifecycle.c.orig  2019-04-09 17:51:55.000000000 +0000
                      9: +++ Python/pylifecycle.c
                     10: @@ -1043,7 +1043,7 @@ initsite(void)
                     11:  static int
                     12:  is_valid_fd(int fd)
                     13:  {
                     14: -#ifdef __APPLE__
                     15: +#if defined(__APPLE__) || defined(__NetBSD__)
                     16:      /* bpo-30225: On macOS Tiger, when stdout is redirected to a pipe
                     17:         and the other side of the pipe is closed, dup(1) succeed, whereas
                     18:         fstat(1, &st) fails with EBADF. Prefer fstat() over dup() to detect

CVSweb <webmaster@jp.NetBSD.org>