Thread::SigMask(3pm)

Thread::SigMask3pm

Thread specific signal masks

Usage

 use Thread::SigMask qw/sigset/;
 use POSIX qw/SIG_BLOCK SIG_UNBLOCK/;
        
 sigmask(SIG_BLOCK, $sigset);
 ...
 sigmask(SIG_UNBLOCK, $sigset);

Version

version 0.004

Overview

This module provides per-thread signal masks. On non-threaded perls it will be effectively the same as POSIX::sigprocmask. The interface works exactly the same as sigprocmask.

Functions

sigmask($how, $newset, $oldset = undef)

Change and/or examine calling process's signal mask. This uses "POSIX::SigSet" objects for the newset and oldset arguments. The behavior of the call is dependent on the value of how.

•

SIG_BLOCK

The set of blocked signals is the union of the current set and the set argument.

•

SIG_UNBLOCK

The signals in set are removed from the current set of blocked signals. It is permissible to attempt to unblock a signal which is not blocked.

•

SIG_SETMASK

The set of blocked signals is set to the argument set.

If oldset is defined, the previous value of the signal mask is stored in oldset. If newset is NULL, then the signal mask is unchanged (i.e., how is ignored), but the current value of the signal mask is nevertheless returned in oldset (if it is not NULL).

Acknowledgements

Parts of this documentation is shamelessly stolen from POSIX and Linux' sigprocmask(2).

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Author

Leon Timmermans <[email protected]>

From libthread-sigmask-perl 0.004-3+b4 in Debian 13 (Trixie). Parsed by carta from the page's man source.