>>-sigprocmask--number--new_mask--variable---------------------><
Function
sigprocmask invokes the sigprocmask callable service to
examine or change the calling thread's signal mask.
Parameters
- number
- To specify the action to be taken on the thread's signal
mask, you can specify a numeric value (see REXX predefined variables)
or the predefined variable beginning with SIG_ used to derive the
appropriate numeric value. Use one of the following predefined variables:
Variable |
Description |
---|
SIG_BLOCK |
Add the signals in new_mask to those
to be blocked for this thread. |
SIG_SETMASK |
Replace the thread's signal mask with new_mask. |
SIG_UNBLOCK |
Delete the signals in new_mask from those
blocked for this thread. |
- new_mask
- The new signal mask, a string of 64 characters with values 0 or
1. The first character represents signal number 1. A string shorter
than 64 characters is padded on the right with zeros. Mask bits set
on represent signals that are blocked. For more information on signals,
see Using the REXX signal services.
- variable
- The name of the buffer that will store the old signal mask,
a string of 64 characters with values 0 or 1, representing
the 64 bits in a signal mask. Mask bits set on represent signals that
are blocked. A zero indicates that no signal mask was returned.
Usage notes
- The sigprocmask service examines, changes, or both examines and
changes the signal mask for the calling thread. This mask is called
the thread's signal mask. If there are any pending unblocked
signals, either at the process level or at the current thread's
level after changing the signal mask, at least one of the signals
is delivered to the thread before the sigprocmask service returns.
- You cannot block the SIGKILL and the SIGSTOP signals. If you call the sigprocmask service
with a request that would block those signals, that part of your request
is ignored and no error is indicated.
- A request to block signals that are not supported is accepted,
and a return value of zero is returned.
- All pending unblocked signals are moved from the process level
to the current thread.
Example
In the following example, assume that
newsigset was assigned
a value earlier in the exec:
"sigprocmask" sig_setmask newsigset "oldsigset"