Issue #28156: Export os.getpid() conditionally

Patch by Ed Schouten.
This commit is contained in:
Berker Peksag 2016-09-15 20:45:16 +03:00
parent 097a49e3e9
commit 3940499ca8
2 changed files with 11 additions and 1 deletions

View file

@ -5895,6 +5895,7 @@ os_getgid_impl(PyObject *module)
#endif /* HAVE_GETGID */
#ifdef HAVE_GETPID
/*[clinic input]
os.getpid
@ -5907,6 +5908,7 @@ os_getpid_impl(PyObject *module)
{
return PyLong_FromPid(getpid());
}
#endif /* HAVE_GETPID */
#ifdef HAVE_GETGROUPLIST