Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
sigprocmask(2)		      System Calls Manual		sigprocmask(2)

NAME
       sigprocmask - examine and change	blocked	signals

SYNOPSIS
DESCRIPTION
       The  function  allows  the calling process to examine and/or change its
       signal mask.

       If the argument set is not a null pointer, it points to a set  of  sig-
       nals to be used to change the currently blocked set.

       The argument how	indicates the way in which the set is changed and con-
       sists of	one of the following values:

	      The resulting set	will be	the union
				       of the current set and the  signal  set
				       pointed to by set.

	      The resulting set	will be	the signal set pointed to by set.

	      The resulting set	will be	the intersection of the
				       current	set  andthe  complement	of the
				       signal set pointed to by	set.

       If the argument oset is not a null pointer, the previous	mask is	stored
       in  the	location  pointed  to  by oset.	 If set	is a null pointer, the
       value of	the argument how is not	significant and	 the  process'	signal
       mask is unchanged; thus the call	can be used to inquire about currently
       blocked signals.

       If there	are any	pending	unblocked signals after	the call to  at	 least
       one of those signals will be delivered before the call to returns.

       It  is  not  possible  to  block	 those	signals	 which cannot  be  ig-
       nored.  This is enforced	by the system without causing an error	to  be
       indicated.

       If  any of the or signals are generated while they are blocked, the re-
       sult is undefined, unless the signal was	generated by a call to or

       If fails, the process' signal mask is not changed.

RETURN VALUE
       Upon successful completion, returns 0. Otherwise	-1 is returned,	is set
       to indicate the error, and the process' signal mask will	be unchanged.

ERRORS
       The function will fail if:

	      [EINVAL]	     The value of the how argument is not equal	to one
			     of	the defined values.

APPLICATION USAGE
   Threads Considerations
       Since each thread maintains its own blocked signal mask,	modifies  only
       the calling thread's blocked signal mask.

       For more	information regarding signals and threads, refer to signal(5).

   LWP (Lightweight Processes) Considerations
       modifies	only the calling LWP's blocked signal mask.

SEE ALSO
       sigaction(2), sigpending(2), sigsetops(3C), sigsuspend(2), <signal.h>.

CHANGE HISTORY
       First released in Issue 3.

       Entry included foralignment with	the POSIX.1-1988 standard.

Issue 4
       The  following  change  is  incorporated	  for	alignment with the ISO
       POSIX-1 standard:

	      -		The type of the	arguments set  and  oset  are  changed
			from sigset_t* to const	sigset_t*.

       Another change is incorporated as follows:

	      -		The  section  is changed to  indicate that signals can
			also be	generated by

sigprocmask(2)		      System Calls Manual		sigprocmask(2)

				  HP-UX	EXTENSIONS

ERRORS
       fails if	any of the following conditions	are encountered:

       [EFAULT]		   set or oset points to an invalid address.  The  re-
			   liable  detection  of  this error is	implementation
			   dependent.

AUTHOR
       was derived from	the IEEE POSIX 1003.1-1988 Standard.

SEE ALSO
       sigaction(2), sigsuspend(2), sigpending(2), sigsetops(3C), signal(5).

STANDARDS CONFORMANCE
								sigprocmask(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | APPLICATION USAGE | SEE ALSO | CHANGE HISTORY | Issue 4 | ERRORS | AUTHOR | SEE ALSO | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=sigprocmask&sektion=2&manpath=HP-UX+11.22>

home | help