1.\" $NetBSD: pthread_sigmask.3,v 1.9 2010/07/09 10:55:11 wiz Exp $ 2.\" 3.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 14.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 15.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 17.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23.\" POSSIBILITY OF SUCH DAMAGE. 24.\" 25.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>. 26.\" All rights reserved. 27.\" 28.\" Redistribution and use in source and binary forms, with or without 29.\" modification, are permitted provided that the following conditions 30.\" are met: 31.\" 1. Redistributions of source code must retain the above copyright 32.\" notice(s), this list of conditions and the following disclaimer as 33.\" the first lines of this file unmodified other than the possible 34.\" addition of one or more copyright notices. 35.\" 2. Redistributions in binary form must reproduce the above copyright 36.\" notice(s), this list of conditions and the following disclaimer in 37.\" the documentation and/or other materials provided with the 38.\" distribution. 39.\" 40.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 41.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE 44.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 45.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 46.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 47.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 48.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 49.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 50.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51.\" 52.\" $FreeBSD: src/lib/libpthread/man/pthread_sigmask.3,v 1.10 2002/09/16 19:29:29 mini Exp $ 53.Dd July 9, 2010 54.Dt PTHREAD_SIGMASK 3 55.Os 56.Sh NAME 57.Nm pthread_sigmask 58.Nd examine and/or change a thread's signal mask 59.Sh LIBRARY 60.Lb libpthread 61.Sh SYNOPSIS 62.\" .In pthread.h 63.In signal.h 64.Ft int 65.Fn pthread_sigmask "int how" "const sigset_t * restrict set" "sigset_t * restrict oset" 66.Sh DESCRIPTION 67The 68.Fn pthread_sigmask 69function examines and/or changes the calling thread's signal mask. 70.Pp 71If 72.Fa set 73is not 74.Dv NULL , 75it specifies a set of signals to be modified, and 76.Fa how 77specifies what to set the signal mask to: 78.Bl -tag -width SIG_UNBLOCK 79.It Dv SIG_BLOCK 80Union of the current mask and 81.Fa set . 82.It Dv SIG_UNBLOCK 83Intersection of the current mask and the complement of 84.Fa set . 85.It Dv SIG_SETMASK 86.Fa set . 87.El 88.Pp 89If 90.Fa oset 91is not 92.Dv NULL , 93the previous signal mask is stored in the location pointed to by 94.Fa oset . 95.Pp 96.Dv SIGKILL 97and 98.Dv SIGSTOP 99cannot be blocked, and will be silently ignored if included in the signal mask. 100.Sh RETURN VALUES 101If successful, 102.Fn pthread_sigmask 103returns 0. 104Otherwise, an error is returned. 105.Sh ERRORS 106.Fn pthread_sigmask 107shall fail if: 108.Bl -tag -width Er 109.It Bq Er EINVAL 110.Fa how 111is not one of the defined values. 112.El 113.Sh SEE ALSO 114.Xr sigaction 2 , 115.Xr sigpending 2 , 116.Xr sigprocmask 2 , 117.Xr sigsuspend 2 , 118.Xr sigwait 2 , 119.Xr sigsetops 3 120.Sh STANDARDS 121The function conforms to 122.St -p1003.1-2001 . 123