Next: Signals, Previous: Runtime Environment, Up: POSIX
Change the current working directory to path. The return value is unspecified.
Return the name of the current working directory.
If mode is omitted, return a decimal number representing the current file creation mask. Otherwise set the file creation mask to mode and return the previous value.
E.g.,
(umask #o022)sets the mask to octal 22, decimal 18.
Return an integer representing the current process ID.
Return a vector of integers representing the current supplementary group IDs.
Return an integer representing the process ID of the parent process.
Return an integer representing the current real user ID.
Return an integer representing the current real group ID.
Return an integer representing the current effective user ID. If the system does not support effective IDs, then the real ID is returned.
(feature? 'EIDs)reports whether the system supports effective IDs.
Returns an integer representing the current effective group ID. If the system does not support effective IDs, then the real ID is returned.
(feature? 'EIDs)reports whether the system supports effective IDs.
Set both the real and effective user IDs to the integer id, provided the process has appropriate privileges. The return value is unspecified.
Set both the real and effective group IDs to the integer id, provided the process has appropriate privileges. The return value is unspecified.
Set the effective user ID to the integer id, provided the process has appropriate privileges. If effective IDs are not supported, the real ID is set instead –
(feature? 'EIDs)reports whether the system supports effective IDs. The return value is unspecified.
Sets the effective group ID to the integer id, provided the process has appropriate privileges. If effective IDs are not supported, the real ID is set instead –
(feature? 'EIDs)reports whether the system supports effective IDs. The return value is unspecified.
Return an integer representing the current process group ID. This is the POSIX definition, not BSD.
Move the process pid into the process group pgid. pid or pgid must be integers: they can be zero to indicate the ID of the current process. Fail on systems that do not support job control. The return value is unspecified.
Create a new session. The current process becomes the session leader and is put in a new process group. The process will be detached from its controlling terminal if it has one. The return value is an integer representing the new process group ID.
Collect status information from a child process which has terminated or (optionally) stopped. Normally the calling process is suspended until this can be done. If more than one child process is eligible then one will be chosen by the operating system.
The value of pid determines the behaviour:
- pid greater than 0
- Request status information from the specified child process.
- pid equal to -1 or WAIT_ANY
- Request status information for any child process.
- pid equal to 0 or WAIT_MYPGRP
- Request status information for any child process in the current process group.
- pid less than -1
- Request status information for any child process whose process group ID is -PID.
The options argument, if supplied, should be the bitwise OR of the values of zero or more of the following variables:
— Variable: WUNTRACED
Report status information for stopped processes as well as terminated processes.
The return value is a pair containing:
- The process ID of the child process, or 0 if
WNOHANGwas specified and no process was collected.- The integer status value.
The following three
functions can be used to decode the process status code returned
by waitpid.
Return the exit status value, as would be normally set if a process ended normally through a call to
exitor_exit, if any, otherwise#f.
Return the signal number which terminated the process, if any, otherwise
#f.
Return the signal number which stopped the process, if any, otherwise
#f.
Execute cmd using the operating system's command processor. Under Unix this is usually the default shell
sh. The value returned is cmd's exit status as returned bywaitpid, which can be interpreted using the functions above.If
systemis called without arguments, it returns a boolean indicating whether the command processor is available.
Terminate the current process without unwinding the Scheme stack. This would typically be useful after a fork. The exit status is status if supplied, otherwise zero.
Execute the file named by path as a new process image. The remaining arguments are supplied to the process; from a C program they are accessable as the
argvargument tomain. Conventionally the first arg is the same as path. All arguments must be strings.If arg is missing, path is executed with a null argument list, which may have system-dependent side-effects.
This procedure is currently implemented using the
execvsystem call, but we call itexeclbecause of its Scheme calling interface.
Similar to
execl, however if filename does not contain a slash then the file to execute will be located by searching the directories listed in thePATHenvironment variable.This procedure is currently implemented using the
execvpsystem call, but we call itexeclpbecause of its Scheme calling interface.
Similar to
execl, but the environment of the new process is specified by env, which must be a list of strings as returned by theenvironprocedure.This procedure is currently implemented using the
execvesystem call, but we call itexeclebecause of its Scheme calling interface.
Create a new child process by duplicating the current parent process. In the child the return value is 0. In the parent the return value is the integer process ID of the child.
This procedure has been renamed from
forkto avoid a naming conflict with the scsh fork.