Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FilePsignal()Psigaction() GEMDOSSyntaxLONG Psigaction( sig, act, oact )
WORD sig;
SIGACTION *act, *oact;
Function Psigaction() specifies a default action for the specified
signal.
Opcode 311 (0x137)
Availability Available when a 'MiNT' cookie with a version of at least
0.95 exists.
Parameters sig specifies the signal whose action you wish to change.
act points to a SIGACTION structure (as defined below) which
defines the handling of future signals of type sig. oact points to a SIGACTION structure which defines the handling
of pending signals of type sig.
typedef struct
{
LONG sa_handler;
LONG sa_mask;
WORD sa_flags;
} SIGACTION;
Setting sa_hander to SIG_DFL (0) wll cause the default
action to take place for the signal. A value of SIG_IGN (1)
will cause the signal to be ignored. Any other value
specifies the address of a signal handler. The signal handler
should expect one LONG argument on its stack which contains
the signal number being delivered. During execution of the
handler, all signals specified in sa_mask are
blocked. sa_flags is a signal-specific flag. When sig is
SIGCHLD, setting Bit #0 (SA_NOCLDSTOP) will cause the
SIGCHLD signal to be delivered only when the child process
terminated (not when stopped).
Binding pea oact
pea act
move.w sig,-(sp)
move.w #$137,-(sp)
trap #1
add.l #12,sp
Return Value Psigaction() returns 0 if successful or a negative GEMDOS error code otherwise.
Comments Calling Psigaction() automatically unmasks the specified
signal for delivery.
See Also Psignal()