Leon Timmermans > Thread-SigMask-0.004 > Thread::SigMask

Download:
Thread-SigMask-0.004.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.004   Source  

NAME ^

Thread::SigMask - Thread specific signal masks

VERSION ^

version 0.004

SYNOPSIS ^

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

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.

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.

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).

SEE ALSO ^

Signal::Mask

ACKNOWLEDGEMENTS ^

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

AUTHOR ^

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2010 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: