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
606edc1d
Commit
606edc1d
authored
Jun 13, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #568235: Add posix.setpgid.
parent
14f8b4cf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
3 deletions
+41
-3
Doc/lib/libos.tex
Doc/lib/libos.tex
+6
-0
Mac/Include/pyconfig.h
Mac/Include/pyconfig.h
+3
-0
Misc/NEWS
Misc/NEWS
+2
-1
Modules/posixmodule.c
Modules/posixmodule.c
+22
-0
RISCOS/pyconfig.h
RISCOS/pyconfig.h
+3
-0
configure
configure
+1
-1
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Doc/lib/libos.tex
View file @
606edc1d
...
...
@@ -144,6 +144,12 @@ are multiple login names which map to the same user id.
Availability:
\UNIX
.
\end{funcdesc}
\begin{funcdesc}
{
getpgid
}{
pid
}
Return the process group id of the process with process id
\var
{
pid
}
.
If
\var
{
pid
}
is 0, the process group id of the current process is
returned. Availability:
\UNIX
.
\end{funcdesc}
\begin{funcdesc}
{
getpgrp
}{}
\index
{
process!group
}
Return the id of the current process group.
...
...
Mac/Include/pyconfig.h
View file @
606edc1d
...
...
@@ -451,6 +451,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define HAVE_GETPEERNAME
#endif
/* Define if you have the getpgid function. */
#undef HAVE_GETPGID
/* Define if you have the getpgrp function. */
#undef HAVE_GETPGRP
...
...
Misc/NEWS
View file @
606edc1d
...
...
@@ -114,7 +114,8 @@ Extension modules
This will create a temporary in-memory bsddb that won't be
written to disk.
- posix.killpg and posix.mknod have been added where available.
- posix.killpg, posix.mknod, and posix.getpgid have been added where
available.
- The locale module now exposes the C library's gettext interface.
...
...
Modules/posixmodule.c
View file @
606edc1d
...
...
@@ -2117,6 +2117,25 @@ posix_getgroups(PyObject *self, PyObject *args)
}
#endif
#ifdef HAVE_GETPGID
static
char
posix_getpgid__doc__
[]
=
"getpgid(pid) -> pgid
\n
\
Call the system call getpgid()."
;
static
PyObject
*
posix_getpgid
(
PyObject
*
self
,
PyObject
*
args
)
{
int
pid
,
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
"i:getpgid"
,
&
pid
))
return
NULL
;
pgid
=
getpgid
(
pid
);
if
(
pgid
<
0
)
return
posix_error
();
return
PyInt_FromLong
((
long
)
pgid
);
}
#endif
/* HAVE_GETPGID */
#ifdef HAVE_GETPGRP
PyDoc_STRVAR
(
posix_getpgrp__doc__
,
"getpgrp() -> pgrp
\n
\
...
...
@@ -6406,6 +6425,9 @@ static PyMethodDef posix_methods[] = {
#ifdef HAVE_SETGROUPS
{
"setgroups"
,
posix_setgroups
,
METH_VARARGS
,
posix_setgroups__doc__
},
#endif
/* HAVE_SETGROUPS */
#ifdef HAVE_GETPGID
{
"getpgid"
,
posix_getpgid
,
METH_VARARGS
,
posix_getpgid__doc__
},
#endif
/* HAVE_GETPGID */
#ifdef HAVE_SETPGRP
{
"setpgrp"
,
posix_setpgrp
,
METH_VARARGS
,
posix_setpgrp__doc__
},
#endif
/* HAVE_SETPGRP */
...
...
RISCOS/pyconfig.h
View file @
606edc1d
...
...
@@ -404,6 +404,9 @@
/* Define if you have the getpeername function. */
#undef HAVE_GETPEERNAME
/* Define if you have the getpgid function. */
#undef HAVE_GETPGID
/* Define if you have the getpgrp function. */
#undef HAVE_GETPGRP
...
...
configure
View file @
606edc1d
...
...
@@ -11449,7 +11449,7 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
for
ac_func
in
alarm
chown chroot
clock confstr ctermid ctermid_r execv
\
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getpeername getpid getpwent getwd
\
gai_strerror getgroups getlogin getpeername getp
gid getp
id getpwent getwd
\
hstrerror inet_pton
kill
killpg
link
lstat
mkfifo mknod
mktime mremap
\
nice
pathconf pause plock poll pthread_init
\
putenv
readlink
\
...
...
configure.in
View file @
606edc1d
...
...
@@ -1621,7 +1621,7 @@ AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
gai_strerror getgroups getlogin getpeername getp
gid getp
id getpwent getwd \
hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
nice pathconf pause plock poll pthread_init \
putenv readlink \
...
...
pyconfig.h.in
View file @
606edc1d
...
...
@@ -176,6 +176,9 @@
/* Define to 1 if you have the `getpeername' function. */
#undef HAVE_GETPEERNAME
/* Define to 1 if you have the `getpgid' function. */
#undef HAVE_GETPGID
/* Define to 1 if you have the `getpgrp' function. */
#undef HAVE_GETPGRP
...
...
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