1443 |
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP} |
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP} |
1444 |
or @code{PRIO_USER}, and @var{who} is interpreted relative to |
or @code{PRIO_USER}, and @var{who} is interpreted relative to |
1445 |
@var{which} (a process identifier for @code{PRIO_PROCESS}, |
@var{which} (a process identifier for @code{PRIO_PROCESS}, |
1446 |
process group identifier for @code{PRIO_PGRP}, and a user |
hhhhprocess group identifier for @code{PRIO_PGRP}, and a user |
1447 |
identifier for @code{PRIO_USER}. A zero value of @var{who} |
identifier for @code{PRIO_USER}. A zero value of @var{who} |
1448 |
denotes the current process, process group, or user. |
denotes the current process, process group, or user. |
1449 |
@var{prio} is a value in the range -20 and 20, the default |
@var{prio} is a value in the range -20 and 20, the default |
1510 |
@var{sig} is as described for the kill procedure. |
@var{sig} is as described for the kill procedure. |
1511 |
@end deffn |
@end deffn |
1512 |
|
|
1513 |
@deffn {Scheme Procedure} sigaction signum [handler [flags]] |
@deffn {Scheme Procedure} sigaction signum [handler [flags [thread]]] |
1514 |
@deffnx {C Function} scm_sigaction (signum, handler, flags) |
@deffnx {C Function} scm_sigaction (signum, handler, flags) |
1515 |
|
@deffnx {C Function} scm_sigaction_for_thread (signum, handler, flags, thread) |
1516 |
Install or report the signal handler for a specified signal. |
Install or report the signal handler for a specified signal. |
1517 |
|
|
1518 |
@var{signum} is the signal number, which can be specified using the value |
@var{signum} is the signal number, which can be specified using the value |
1519 |
of variables such as @code{SIGINT}. |
of variables such as @code{SIGINT}. |
1520 |
|
|
1521 |
If @var{action} is omitted, @code{sigaction} returns a pair: the |
If @var{handler} is omitted, @code{sigaction} returns a pair: the |
1522 |
CAR is the current |
CAR is the current |
1523 |
signal hander, which will be either an integer with the value @code{SIG_DFL} |
signal hander, which will be either an integer with the value @code{SIG_DFL} |
1524 |
(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which |
(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which |
1525 |
handles the signal, or @code{#f} if a non-Scheme procedure handles the |
handles the signal, or @code{#f} if a non-Scheme procedure handles the |
1526 |
signal. The CDR contains the current @code{sigaction} flags for the handler. |
signal. The CDR contains the current @code{sigaction} flags for the handler. |
1527 |
|
|
1528 |
If @var{action} is provided, it is installed as the new handler for |
If @var{handler} is provided, it is installed as the new handler for |
1529 |
@var{signum}. @var{action} can be a Scheme procedure taking one |
@var{signum}. The parameter @var{handler} can be a Scheme procedure |
1530 |
argument, or the value of @code{SIG_DFL} (default action) or |
taking one argument, or the value of @code{SIG_DFL} (default action) or |
1531 |
@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler |
@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler |
1532 |
was installed before @code{sigaction} was first used. Flags can |
was installed before @code{sigaction} was first used. When a scheme |
1533 |
optionally be specified for the new handler (@code{SA_RESTART} will |
procedure has been specified, that procedure will run in the given |
1534 |
always be added if it's available and the system is using restartable |
@var{thread}. When no thread has been given, the thread that made this |
1535 |
system calls.) The return value is a pair with information about the |
call to @code{sigaction} is used. |
1536 |
old handler as described above. |
|
1537 |
|
Flags can optionally be specified for the new handler (@code{SA_RESTART} |
1538 |
|
will always be added if it's available and the system is using |
1539 |
|
restartable system calls.) The return value is a pair with information |
1540 |
|
about the old handler as described above. |
1541 |
|
|
1542 |
This interface does not provide access to the "signal blocking" |
This interface does not provide access to the "signal blocking" |
1543 |
facility. Maybe this is not needed, since the thread support may |
facility. Maybe this is not needed, since the thread support may |