Node:Signals, Next:Terminals and Ptys, Previous:Processes, Up:POSIX
Procedures to raise, handle and wait for signals.
kill pid sig | Scheme Procedure |
scm_kill (pid, sig) | C Function |
Sends a signal to the specified process or group of processes.
pid specifies the processes to which the signal is sent:
sig should be specified using a variable corresponding to the Unix symbolic name, e.g.,
|
raise sig | Scheme Procedure |
scm_raise (sig) | C Function |
Sends a specified signal sig to the current process, where sig is as described for the kill procedure. |
sigaction signum [handler [flags]] | Scheme Procedure |
scm_sigaction (signum, handler, flags) | C Function |
Install or report the signal handler for a specified signal.
signum is the signal number, which can be specified using the value
of variables such as If action is omitted, If action is provided, it is installed as the new handler for
signum. action can be a Scheme procedure taking one
argument, or the value of This interface does not provide access to the "signal blocking" facility. Maybe this is not needed, since the thread support may provide solutions to the problem of consistent access to data structures. |
restore-signals | Scheme Procedure |
scm_restore_signals () | C Function |
Return all signal handlers to the values they had before any call to
sigaction was made. The return value is unspecified.
|
alarm i | Scheme Procedure |
scm_alarm (i) | C Function |
Set a timer to raise a SIGALRM signal after the specified
number of seconds (an integer). It's advisable to install a signal
handler for
SIGALRM beforehand, since the default action is to terminate
the process.
The return value indicates the time remaining for the previous alarm, if any. The new value replaces the previous alarm. If there was no previous alarm, the return value is zero. |
pause | Scheme Procedure |
scm_pause () | C Function |
Pause the current process (thread?) until a signal arrives whose action is to either terminate the current process or invoke a handler procedure. The return value is unspecified. |
sleep i | Scheme Procedure |
scm_sleep (i) | C Function |
Wait for the given number of seconds (an integer) or until a signal arrives. The return value is zero if the time elapses or the number of seconds remaining otherwise. |
usleep i | Scheme Procedure |
scm_usleep (i) | C Function |
Sleep for I microseconds. usleep is not available on
all platforms.
|
setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds | Scheme Procedure |
scm_setitimer (which_timer, interval_seconds, interval_microseconds, value_seconds, value_microseconds) | C Function |
Set the timer specified by which_timer according to the given
interval_seconds, interval_microseconds,
value_seconds, and value_microseconds values.
Return information about the timer's previous setting. Errors are handled as described in the guile info pages under "POSIX Interface Conventions". The timers available are: The return value will be a list of two cons pairs representing the
current state of the given timer. The first pair is the seconds and
microseconds of the timer |
getitimer which_timer | Scheme Procedure |
scm_getitimer (which_timer) | C Function |
Return information about the timer specified by which_timer
Errors are handled as described in the guile info pages under "POSIX
Interface Conventions".
The timers available are: The return value will be a list of two cons pairs representing the
current state of the given timer. The first pair is the seconds and
microseconds of the timer |