HPlogo MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4  POSIX/iX Library Function Descriptions

sigaddset

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Adds a signal to a signal set.

Syntax

   #include <signal.h>

   int sigaddset (sigset_t *set, int sig);

Parameters

set

A pointer to a structure of type sigset_t containing a set of signals to which sig is to be added.

sig

The signal number of the signal to add to set. Valid signals are described in Table 3-6 “POSIX/iX Signals”.

Return Values

0

Success.

-1

An error occurred. The signal is not added, and errno is set to indicate the error condition.

Description

The sigaddset() function adds the signal sig to the set of signals specified in the structure pointed to by set.

The structure of type sigset_t pointed to by set must be initialized by sigemptyset() or sigfillset() prior to being used by sigaddset(); otherwise, the results are undefined.

Implementation Considerations

Refer to the EFAULT error description below.

Errors

If an error occurs, errno is set to one of the following values:

EFAULTCAUSE The system detected a NULL or bad address in attempting to use the set parameter.
 ACTION Make sure that the pointer is correctly initialized.
EINVALCAUSE The signal sig is not a valid signal number.
 ACTION Refer to Table 3-6 “POSIX/iX Signals” for descriptions of valid signal numbers.

See Also

sigaction(), sigdelset(), sigemptyset(), sigfillset(), sigismember(), <signal.h>, POSIX.1 (Section 3.3.3)

Feedback to webmaster