*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> sigprocmask (2)              
Title
Content
Arch
Section
 

Contents


 sigprocmask(2)                                               sigprocmask(2)




 NAME    [Toc]    [Back]
      sigprocmask - examine and change blocked signals

 SYNOPSIS    [Toc]    [Back]
      #include <signal.h>

      int sigprocmask(
           int how,
           const sigset_t *set,
           sigset_t *oset
      );

 DESCRIPTION    [Toc]    [Back]
      The sigprocmask() function allows the calling thread to examine and/or
      change its signal mask.

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

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

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

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

           SIG_UNBLOCK       The resulting set will be the intersection of
                             the current set and the 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 thread's
      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
      sigprocmask(), at least one of those signals will be delivered before
      the call to sigprocmask() returns.

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

      If any of the SIGFPE, SIGILL, or SIGSEGV signals are generated while
      they are blocked, the result is undefined, unless the signal was
      generated by a call to kill() or raise().




 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 sigprocmask(2)                                               sigprocmask(2)




      If sigprocmask() fails, the thread's signal mask is not changed.

 RETURN VALUE    [Toc]    [Back]
      Upon successful completion, sigprocmask() returns 0. Otherwise -1 is
      returned, errno is set to indicate the error, and the thread's signal
      mask will be unchanged.

 ERRORS    [Toc]    [Back]
      The sigprocmask() function will fail if:

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

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

 APPLICATION USAGE    [Toc]    [Back]
    Threads Considerations
      Since each thread maintains its own blocked signal mask, sigprocmask()
      modifies only the calling thread's blocked signal mask.

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

    LWP (Lightweight Processes) Considerations    [Toc]    [Back]
      sigprocmask() modifies only the calling LWP's blocked signal mask.

 AUTHOR    [Toc]    [Back]
      sigprocmask() was derived from the IEEE POSIX 1003.1-1988 Standard.

 SEE ALSO    [Toc]    [Back]
      pthread_sigmask(3T), sigaction(2), sigpending(2), sigsetops(3C),
      sigsuspend(2), signal(5).

 CHANGE HISTORY    [Toc]    [Back]
      First released in Issue 3.

      Entry included for alignment with the POSIX.1-1988 standard.

 STANDARDS CONFORMANCE    [Toc]    [Back]
      sigprocmask(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1


 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
sigsuspend Tru64 Atomically change the set of blocked signals and wait for a signal
pxfsigprocmask IRIX Examines and changes blocked signals
sigpause FreeBSD atomically release blocked signals and wait for interrupt
sigsuspend NetBSD atomically release blocked signals and wait for interrupt
sigsuspend FreeBSD atomically release blocked signals and wait for interrupt
sigpause Linux atomically release blocked signals and wait for interrupt
sigpause OpenBSD atomically release blocked signals and wait for interrupt
sigsuspend OpenBSD atomically release blocked signals and wait for interrupt
sigpause NetBSD atomically release blocked signals and wait for interrupt
sigpending Tru64 Examine pending signals
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service