Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6e3257ff
Commit
6e3257ff
authored
Sep 15, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28156: Export os.getpid() conditionally
Patch by Ed Schouten.
parent
96f66ea7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
Modules/clinic/posixmodule.c.h
Modules/clinic/posixmodule.c.h
+9
-1
Modules/posixmodule.c
Modules/posixmodule.c
+2
-0
No files found.
Modules/clinic/posixmodule.c.h
View file @
6e3257ff
...
...
@@ -2349,6 +2349,8 @@ os_getgid(PyObject *module, PyObject *Py_UNUSED(ignored))
#endif
/* defined(HAVE_GETGID) */
#if defined(HAVE_GETPID)
PyDoc_STRVAR
(
os_getpid__doc__
,
"getpid($module, /)
\n
"
"--
\n
"
...
...
@@ -2367,6 +2369,8 @@ os_getpid(PyObject *module, PyObject *Py_UNUSED(ignored))
return
os_getpid_impl
(
module
);
}
#endif
/* defined(HAVE_GETPID) */
#if defined(HAVE_GETGROUPS)
PyDoc_STRVAR
(
os_getgroups__doc__
,
...
...
@@ -5841,6 +5845,10 @@ exit:
#define OS_GETGID_METHODDEF
#endif
/* !defined(OS_GETGID_METHODDEF) */
#ifndef OS_GETPID_METHODDEF
#define OS_GETPID_METHODDEF
#endif
/* !defined(OS_GETPID_METHODDEF) */
#ifndef OS_GETGROUPS_METHODDEF
#define OS_GETGROUPS_METHODDEF
#endif
/* !defined(OS_GETGROUPS_METHODDEF) */
...
...
@@ -6140,4 +6148,4 @@ exit:
#ifndef OS_GETRANDOM_METHODDEF
#define OS_GETRANDOM_METHODDEF
#endif
/* !defined(OS_GETRANDOM_METHODDEF) */
/*[clinic end generated code: output=
dfa6bc9d1f2db750
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
b9ed5703d2feb0d9
input=a9049054013a1b77]*/
Modules/posixmodule.c
View file @
6e3257ff
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment