Open System Services System Calls Reference Manual (G06.25+, H06.03+)
sigprocmask(2) OSS System Calls Reference Manual
Use From the Guardian Environment
If called from a TNS or accelerated Guardian process, the actions of this function are undefined
and errno is set to [ENOTOSS].
EXAMPLES
The following example shows how to use sigprocmask(SIG_BLOCK)
to add the signal SIG-
INT to the signal set named newset and save the old mask. Later, the
sigprocmask(SIG_SETMASK)
function restores the mask to the previous value returned by the
sigprocmask(SIG_BLOCK)
function.
#include <signal.h>
int return_value;
sigset_t newset, oldset;
sigemptyset(&newset);
sigaddset(&newset, SIGINT);
return_value = sigprocmask (SIG_BLOCK, &newset, &oldset);
...
return_value = sigprocmask (SIG_SETMASK, &oldset, NULL);
RETURN VALUES
Upon successful completion, the sigprocmask() function returns the value 0 (zero). If the sig-
procmask() function fails, the signal mask of the process is unchanged, the value -1 is returned,
and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the sigprocmask() function sets errno to the
corresponding value:
[EFAULT] The set or o_set parameter points to a location outside the allocated address
space of the process.
[EINVAL] The value of the how parameter is not equal to one of the defined values.
[ENOTOSS] The calling process was not an OSS process or a native Guardian process. The
sigprocmask() function cannot be used in the Guardian environment by a TNS
or accelerated Guardian process.
RELATED INFORMATION
Functions: kill(2), pthread_sigmask(2), sigaction(2), sigaddset(2), sigdelset(2), sigemp-
tyset(2), sigfillset(2), sigismember(2), sigpending(2), sigsuspend(2).
Files: signal(4).
STANDARDS CONFORMANCE
The following are HP extensions to the XPG4 Version 2 specification:
• HP has defined several new signals, including SIGABEND. See the signal(4) reference
page for a complete list.
• This function can set errno to the value [ENOTOSS].
7−66 Hewlett-Packard Company 527186-003