02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

sigaction(3P) sigaction(3P)<br />

2<br />

number.<br />

The sigaction structure is defined in :<br />

struct sigaction {<br />

void (*sa handler) ();<br />

sigset_t sa_mask;<br />

int sa_flags;<br />

} ;<br />

If act is not NULL, it points to a structure specifying the action to<br />

be taken when the signal is delivered. If oact is not NULL, the action<br />

previously associated with the signal is stored in the location<br />

pointed to by oact. If act is NULL, signal handling is unchanged.<br />

When act is NULL, sigaction can be used to inquire about the<br />

current handling of a given signal.<br />

The sa_flags field of act can be used to modify the delivery of<br />

a specific signal. If sig is SIGCHLD and the SA_NOCLDSTOP<br />

flag is not set in sa flags, a SIGCHLD signal is generated for<br />

the calling process if any of its child processes stop. If sig is<br />

SIGCHLD and the SA_NOCLDSTOP flag is set in sa_flags, a<br />

SIGCHLD signal is not generated for stopped child processes. If<br />

the SA_ONSTACK bit is set in sa flags, the system delivers<br />

the signal to the process on a sigDai stack specified by sigstack(2).<br />

If the SA_INTERRUPT bit is set in sa flags, system<br />

calls interrupted by a signal are not restarted. -<br />

When a signal is caught by a signal-catching function, a new signal<br />

mask is calculated and installed for the duration of the signalcatching<br />

function or until sigprocmaskO or sigsuspendO is<br />

called. This mask is formed by taking the union of the current signal<br />

mask and the set associated with the action for the signal being<br />

delivered, such as sa mask, and then including the signal being<br />

delivered. If and when the user's signal handler returns normally,<br />

the original signal mask is restored.<br />

Once an action is installed for a specific signal, it remains installed<br />

until another action is explicitly requested by another call to<br />

sigaction or until one of the exec functions is called.<br />

SIGKILL and SIGSTOP cannot be caught or ignored. The set of<br />

signals specified by sa mask is not allowed to block these signals.<br />

This is silently enfurced.<br />

February, 1990<br />

RevisionC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!