[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.21.7 System Inquiry

Function: sys-uname
[POSIX] Returns a list of five elements, (sysname nodename release version machine).

Function: sys-gethostname
Returns the host name. If the system doesn't have gethostname(), the second element of the list returned by sys-uname is used.

Function: sys-getdomainname
Returns the domain name. If the system doesn't have getdomainname(), "localdomain" is returned.

Function: sys-getcwd
[POSIX] Returns the current working directory by a string. If the current working directory couldn't be obtained from the system, an error is signalled. See also sys-chdir (See section 6.21.3.5 Other file operations), current-directory (See section 11.6.1 Directory utilities).

Function: sys-getgid
Function: sys-getegid
[POSIX] Returns integer value of real and effective group id of the current process, respectively.

Function: sys-setgid gid
[POSIX] Sets the effective group id of the current process.

Function: sys-getuid
Function: sys-geteuid
[POSIX] Returns integer value of real and effective user id of the current process, respectively.

Function: sys-setuid uid
[POSIX] Sets the effective user id of the current process.

Function: sys-getgroups
[POSIX] Returns a list of integer ids of supplementary groups.

Function: sys-getlogin
[POSIX] Returns a string of the name of the user logged in on the controlling terminal of the current process. If the system can't determine the information, #f is returned.

Function: sys-getpgrp
[POSIX] Returns a process group id of the current process.

Function: sys-getpgid pid
Returns a process group id of the process specified by pid. If pid is zero, the current process is used.

Note that getpgid() call is not in POSIX. If the system doesn't have getpgid(), sys-getpgid still works if pid is zero (it just calls sys-getpgrp), but signals an error if pid is not zero.

Function: sys-setpgid pid pgid
[POSIX] Sets the process group id of the process pid to pgid. If pid is zero, the process ID of the current process is used. If pgid is zero, the process ID of the process specified by pid is used. (Hence sys-setpgid(0, 0) sets the process group id of the current process to the current process id).

Function: sys-setsid
[POSIX] Creates a new session if the calling process is not a process group leader.

Function: sys-getpid
Function: sys-getppid
[POSIX] Returns the current process id and the parent process id, respectively.

Function: sys-times
[POSIX]

Function: sys-ctermid
[POSIX] Returns the name of the controlling terminal of the process. This may be just a "/dev/tty". See also sys-ttyname.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ken Dickey on November, 28 2002 using texi2html