Annotation of pkgsrc/lang/python37/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:25 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-03-25 20:21:05.000000000 +0000
9: +++ Python/pylifecycle.c
10: @@ -1672,7 +1672,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>