.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Thread::SigMask 3pm" .TH Thread::SigMask 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Thread::SigMask \- Thread specific signal masks .SH VERSION .IX Header "VERSION" version 0.004 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Thread::SigMask qw/sigset/; \& use POSIX qw/SIG_BLOCK SIG_UNBLOCK/; \& \& sigmask(SIG_BLOCK, $sigset); \& ... \& sigmask(SIG_UNBLOCK, $sigset); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" 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. .SH FUNCTIONS .IX Header "FUNCTIONS" .ie n .SS "sigmask($how, $newset, $oldset = undef)" .el .SS "sigmask($how, \f(CW$newset\fP, \f(CW$oldset\fP = undef)" .IX Subsection "sigmask($how, $newset, $oldset = undef)" Change and/or examine calling process's signal mask. This uses \f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the newset and oldset arguments. The behavior of the call is dependent on the value of how. .IP \(bu 4 SIG_BLOCK .Sp The set of blocked signals is the union of the current set and the set argument. .IP \(bu 4 SIG_UNBLOCK .Sp 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. .IP \(bu 4 SIG_SETMASK .Sp The set of blocked signals is set to the argument set. .PP 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). .SH "SEE ALSO" .IX Header "SEE ALSO" Signal::Mask .SH ACKNOWLEDGEMENTS .IX Header "ACKNOWLEDGEMENTS" Parts of this documentation is shamelessly stolen from POSIX and Linux' \fBsigprocmask\fR\|(2). .SH AUTHOR .IX Header "AUTHOR" Leon Timmermans .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2010 by Leon Timmermans. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.