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
b2c92f44
Commit
b2c92f44
authored
Feb 16, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #511193: Implement killpg in posixmodule.
parent
b4779c34
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
351 additions
and
336 deletions
+351
-336
Misc/NEWS
Misc/NEWS
+2
-0
Modules/posixmodule.c
Modules/posixmodule.c
+21
-0
configure
configure
+324
-335
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Misc/NEWS
View file @
b2c92f44
...
...
@@ -13,6 +13,8 @@ Core and builtins
Previously, an xreadlines object was returned which would raise
a ValueError when the xreadlines.next() method was called.
- posix.killpg has been added where available.
Extension modules
- dl now builds on every system that has dlfcn.h. Failure in case
...
...
Modules/posixmodule.c
View file @
b2c92f44
...
...
@@ -2199,6 +2199,24 @@ posix_kill(PyObject *self, PyObject *args)
}
#endif
#ifdef HAVE_KILLPG
static
char
posix_killpg__doc__
[]
=
"killpg(pgid, sig) -> None
\n
\
Kill a process group with a signal."
;
static
PyObject
*
posix_killpg
(
PyObject
*
self
,
PyObject
*
args
)
{
int
pgid
,
sig
;
if
(
!
PyArg_ParseTuple
(
args
,
"ii:killpg"
,
&
pgid
,
&
sig
))
return
NULL
;
if
(
killpg
(
pgid
,
sig
)
==
-
1
)
return
posix_error
();
Py_INCREF
(
Py_None
);
return
Py_None
;
}
#endif
#ifdef HAVE_PLOCK
#ifdef HAVE_SYS_LOCK_H
...
...
@@ -5573,6 +5591,9 @@ static PyMethodDef posix_methods[] = {
#ifdef HAVE_KILL
{
"kill"
,
posix_kill
,
METH_VARARGS
,
posix_kill__doc__
},
#endif
/* HAVE_KILL */
#ifdef HAVE_KILLPG
{
"killpg"
,
posix_killpg
,
METH_VARARGS
,
posix_killpg__doc__
},
#endif
/* HAVE_KILLPG */
#ifdef HAVE_PLOCK
{
"plock"
,
posix_plock
,
METH_VARARGS
,
posix_plock__doc__
},
#endif
/* HAVE_PLOCK */
...
...
configure
View file @
b2c92f44
This diff is collapsed.
Click to expand it.
configure.in
View file @
b2c92f44
...
...
@@ -1423,7 +1423,7 @@ AC_MSG_RESULT(MACHDEP_OBJS)
AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
hstrerror inet_pton kill link lstat mkfifo mktime mremap \
hstrerror inet_pton kill
killpg
link lstat mkfifo mktime mremap \
nice pathconf pause plock poll pthread_init \
putenv readlink \
select setegid seteuid setgid setgroups \
...
...
pyconfig.h.in
View file @
b2c92f44
...
...
@@ -459,6 +459,9 @@
/* Define if you have the kill function. */
#undef HAVE_KILL
/* Define if you have the killpg function. */
#undef HAVE_KILLPG
/* Define if you have the link function. */
#undef HAVE_LINK
...
...
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