From: Guido van Rossum Date: Thu, 30 Mar 1995 10:56:54 +0000 (+0000) Subject: add WNOHANG X-Git-Tag: v1.2~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de4e124c9b8e48f8777b1d51afdf8b1fa709718f;p=thirdparty%2FPython%2Fcpython.git add WNOHANG --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 38615283cd53..9b2c0e066194 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)