This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=3e5aed1c3be296b92f3a21e0dfde315deaef9daa The branch, master has been updated via 3e5aed1c3be296b92f3a21e0dfde315deaef9daa (commit) from 0ca3a342d19ec89b8ae6bba0a74f0f9ecc5cf7c2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3e5aed1c3be296b92f3a21e0dfde315deaef9daa Author: Neil Jerram <n...@ossau.uklinux.net> Date: Sun Dec 27 16:59:54 2009 +0000 Add support for getsid * configure.ac: Check availability of getsid() C library call. * libguile/posix.c (scm_getsid): New primitive. * libguile/posix.h: Declaration for new primitive. ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- libguile/posix.c | 12 ++++++++++++ libguile/posix.h | 1 + 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 35c2ed9..5143dcc 100644 --- a/configure.ac +++ b/configure.ac @@ -765,7 +765,7 @@ AC_CHECK_HEADERS([assert.h crt_externs.h]) # strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin # nl_langinfo - X/Open, not available on Windows. # -AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround ftime ftruncate fchown getcwd geteuid gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe readdir_r readdir64_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron strcoll strcoll_l newlocale nl_langinfo]) +AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround ftime ftruncate fchown getcwd geteuid getsid gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe readdir_r readdir64_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron strcoll strcoll_l newlocale nl_langinfo]) # Reasons for testing: # netdb.h - not in mingw diff --git a/libguile/posix.c b/libguile/posix.c index 5187ff9..ef52c38 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -983,6 +983,18 @@ SCM_DEFINE (scm_setsid, "setsid", 0, 0, 0, #undef FUNC_NAME #endif /* HAVE_SETSID */ +#ifdef HAVE_GETSID +SCM_DEFINE (scm_getsid, "getsid", 1, 0, 0, + (SCM pid), + "Returns the session ID of process @var{pid}. (The session\n" + "ID of a process is the process group ID of its session leader.)") +#define FUNC_NAME s_scm_getsid +{ + return scm_from_int (getsid (scm_to_int (pid))); +} +#undef FUNC_NAME +#endif /* HAVE_GETSID */ + /* ttyname returns its result in a single static buffer, hence scm_i_misc_mutex for thread safety. In glibc 2.3.2 two threads diff --git a/libguile/posix.h b/libguile/posix.h index 4171332..430d75b 100644 --- a/libguile/posix.h +++ b/libguile/posix.h @@ -33,6 +33,7 @@ SCM_API SCM scm_tcsetpgrp (SCM port, SCM pgid); SCM_API SCM scm_tcgetpgrp (SCM port); SCM_API SCM scm_ctermid (void); SCM_API SCM scm_setsid (void); +SCM_API SCM scm_getsid (SCM pid); SCM_API SCM scm_setpgid (SCM pid, SCM pgid); SCM_API SCM scm_pipe (void); SCM_API SCM scm_getgroups (void); hooks/post-receive -- GNU Guile