pyodide/cpython/patches/disable-set_inheritable.patch

23 lines
564 B
Diff

diff --git a/Python/fileutils.c b/Python/fileutils.c
index 35869c81ac..1af4ead7f5 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -964,6 +964,9 @@ _Py_get_inheritable(int fd)
static int
set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
{
+#ifdef EMSCRIPTEN
+ return 0;
+#else
#ifdef MS_WINDOWS
HANDLE handle;
DWORD flags;
@@ -1080,6 +1083,7 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
}
return 0;
#endif
+#endif
}
/* Make the file descriptor non-inheritable.