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
e43d577b
Commit
e43d577b
authored
Nov 10, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #839038: Add getsid(2).
parent
d42c419f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
7 deletions
+40
-7
Doc/lib/libos.tex
Doc/lib/libos.tex
+6
-0
Modules/posixmodule.c
Modules/posixmodule.c
+22
-0
configure
configure
+3
-2
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+8
-4
No files found.
Doc/lib/libos.tex
View file @
e43d577b
...
...
@@ -254,6 +254,12 @@ Set the current process's real and effective group ids.
Availability:
\UNIX
.
\end{funcdesc}
\begin{funcdesc}
{
getsid
}{
pid
}
Calls the system call
\cfunction
{
getsid()
}
. See the
\UNIX
{}
manual
for the semantics.
Availability:
\UNIX
.
\end{funcdesc}
\begin{funcdesc}
{
setsid
}{}
Calls the system call
\cfunction
{
setsid()
}
. See the
\UNIX
{}
manual
for the semantics.
...
...
Modules/posixmodule.c
View file @
e43d577b
...
...
@@ -4755,6 +4755,25 @@ Return a tuple of floating point numbers indicating process times.");
#endif
#ifdef HAVE_GETSID
PyDoc_STRVAR
(
posix_getsid__doc__
,
"getsid(pid) -> sid
\n\n
\
Call the system call getsid()."
);
static
PyObject
*
posix_getsid
(
PyObject
*
self
,
PyObject
*
args
)
{
int
pid
,
sid
;
if
(
!
PyArg_ParseTuple
(
args
,
"i:getsid"
,
&
pid
))
return
NULL
;
sid
=
getsid
(
pid
);
if
(
sid
<
0
)
return
posix_error
();
return
PyInt_FromLong
((
long
)
sid
);
}
#endif
/* HAVE_GETSID */
#ifdef HAVE_SETSID
PyDoc_STRVAR
(
posix_setsid__doc__
,
"setsid()
\n\n
\
...
...
@@ -7020,6 +7039,9 @@ static PyMethodDef posix_methods[] = {
#if defined(HAVE_WAITPID) || defined(HAVE_CWAIT)
{
"waitpid"
,
posix_waitpid
,
METH_VARARGS
,
posix_waitpid__doc__
},
#endif
/* HAVE_WAITPID */
#ifdef HAVE_GETSID
{
"getsid"
,
posix_getsid
,
METH_VARARGS
,
posix_getsid__doc__
},
#endif
/* HAVE_GETSID */
#ifdef HAVE_SETSID
{
"setsid"
,
posix_setsid
,
METH_NOARGS
,
posix_setsid__doc__
},
#endif
/* HAVE_SETSID */
...
...
configure
View file @
e43d577b
#! /bin/sh
# From configure.in Revision: 1.43
8
.
# From configure.in Revision: 1.43
9
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for python 2.4.
#
...
...
@@ -13094,12 +13094,13 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
for
ac_func
in
alarm
chown
clock confstr ctermid execv
\
fork fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid
\
getpriority getpwent getwd
\
getpriority getpwent get
sid get
wd
\
kill
killpg lchown lstat
mkfifo mknod
mktime
\
mremap
nice
pathconf pause plock poll pthread_init
\
putenv
readlink realpath
\
...
...
configure.in
View file @
e43d577b
...
...
@@ -2074,7 +2074,7 @@ AC_MSG_RESULT(MACHDEP_OBJS)
AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \
fork fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getpwent getwd \
getpriority getpwent get
sid get
wd \
kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink realpath \
...
...
pyconfig.h.in
View file @
e43d577b
...
...
@@ -126,6 +126,9 @@
/* Define to 1 if you have the `fstatvfs' function. */
#undef HAVE_FSTATVFS
/* Define if you have the 'fsync' function. */
#undef HAVE_FSYNC
/* Define to 1 if you have the `ftell64' function. */
#undef HAVE_FTELL64
...
...
@@ -198,6 +201,9 @@
/* Define to 1 if you have the `getpwent' function. */
#undef HAVE_GETPWENT
/* Define to 1 if you have the `getsid' function. */
#undef HAVE_GETSID
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
...
...
@@ -485,9 +491,6 @@
/* Define if you have the 'symlink' function. */
#undef HAVE_SYMLINK
/* Define if you have the 'fsync' function. */
#undef HAVE_FSYNC
/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF
...
...
@@ -616,7 +619,8 @@
#undef HAVE_UNSETENV
/* Define if you have a useable wchar_t type defined in wchar.h; useable means
wchar_t must be 16-bit unsigned type. (see Include/unicodeobject.h). */
wchar_t must be an unsigned type with at least 16 bits. (see
Include/unicodeobject.h). */
#undef HAVE_USABLE_WCHAR_T
/* Define to 1 if you have the `utimes' function. */
...
...
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