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.
#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\
#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 */
#! /bin/sh
-# From configure.in Revision: 1.438 .
+# From configure.in Revision: 1.439 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for python 2.4.
#
+
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 getsid getwd \
kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink realpath \
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 getsid getwd \
kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink realpath \
/* 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
/* 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
/* 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
#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. */