summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 3861528..9b2c0e0 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1504,6 +1504,14 @@ initposix()
fatal("can't define posix.environ");
DECREF(v);
+#ifdef WNOHANG
+ /* Export WNOHANG symbol */
+ v = newintobject((long)WNOHANG);
+ if (v == NULL || dictinsert(d, "WNOHANG", v) != 0)
+ fatal("can't define posix.WNOHANG");
+ DECREF(v);
+#endif
+
/* Initialize posix.error exception */
PosixError = newstringobject("posix.error");
if (PosixError == NULL || dictinsert(d, "error", PosixError) != 0)