sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API


   #include <signal.h>

   int sigvec(int sig, const struct sigvec *vec, struct sigvec *ovec);

   int sigmask(int signum);

   int sigblock(int mask);

   int sigsetmask(int mask);

   int siggetmask(void);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

   All functions shown above:
       Since glibc 2.19:
       Glibc 2.19 and earlier:


   These  functions are provided in glibc as a compatibility interface for
   programs that make use of the historical BSD signal API.  This  API  is
   obsolete:   new   applications   should   use   the  POSIX  signal  API
   (sigaction(2), sigprocmask(2), etc.).

   The sigvec() function sets and/or gets the disposition  of  the  signal
   sig  (like the POSIX sigaction(2)).  If vec is not NULL, it points to a
   sigvec structure that defines the new disposition for sig.  If ovec  is
   not  NULL,  it  points to a sigvec structure that is used to return the
   previous disposition of sig.  To obtain the current disposition of  sig
   without  changing  it, specify NULL for vec, and a non-null pointer for

   The dispositions for SIGKILL and SIGSTOP cannot be changed.

   The sigvec structure has the following form:

       struct sigvec {
           void (*sv_handler)(int); /* Signal disposition */
           int    sv_mask;          /* Signals to be blocked in handler */
           int    sv_flags;         /* Flags */

   The sv_handler field specifies the disposition of the  signal,  and  is
   either:  the address of a signal handler function; SIG_DFL, meaning the
   default disposition applies for the signal; or  SIG_IGN,  meaning  that
   the signal is ignored.

   If  sv_handler  specifies the address of a signal handler, then sv_mask
   specifies a mask of signals that are to be blocked while the handler is
   executing.  In addition, the signal for which the handler is invoked is
   also blocked.  Attempts  to  block  SIGKILL  or  SIGSTOP  are  silently

   If  sv_handler  specifies  the  address  of  a signal handler, then the
   sv_flags field  specifies  flags  controlling  what  happens  when  the
   handler  is  called.   This  field  may  contain  zero  or  more of the
   following flags:

          If the signal handler interrupts a blocking  system  call,  then
          upon  return  from  the  handler  the  system  call  will not be
          restarted: instead it will fail with the error EINTR.   If  this
          flag  is  not  specified,  then  system  calls  are restarted by

          Reset the disposition  of  the  signal  to  the  default  before
          calling the signal handler.  If this flag is not specified, then
          the handler remains established until explicitly  removed  by  a
          later  call  to  sigvec()  or  until  the  process  performs  an

          Handle the signal on the alternate  signal  stack  (historically
          established  under  BSD  using the obsolete sigstack() function;
          the POSIX replacement is sigaltstack(2)).

   The sigmask() macro constructs and returns a "signal mask" for  signum.
   For  example, we can initialize the vec.sv_mask field given to sigvec()
   using code such as the following:

       vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
                   /* Block SIGQUIT and SIGABRT during
                      handler execution */

   The sigblock() function adds the  signals  in  mask  to  the  process's
   signal  mask  (like  POSIX  sigprocmask(SIG_BLOCK)),  and  returns  the
   process's previous signal mask.  Attempts to block SIGKILL  or  SIGSTOP
   are silently ignored.

   The  sigsetmask()  function sets the process's signal mask to the value
   given in mask (like POSIX sigprocmask(SIG_SETMASK)),  and  returns  the
   process's previous signal mask.

   The  siggetmask()  function  returns the process's current signal mask.
   This call is equivalent to sigblock(0).


   The sigvec() function returns 0 on success; on error, it returns -1 and
   sets errno to indicate the error.

   The  sigblock()  and  sigsetmask() functions return the previous signal

   The sigmask() macro returns the signal mask for signum.


   See the ERRORS under sigaction(2) and sigprocmask(2).


   Starting with version 2.21, the GNU C library  no  longer  exports  the
   sigvec()   function   as   part   of  the  ABI.   (To  ensure  backward
   compatibility, the glibc symbol versioning scheme continues  to  export
   the  interface  to  binaries  linked  against  older  versions  of  the


   For  an  explanation  of  the  terms  used   in   this   section,   see

   │InterfaceAttributeValue   │
   │sigvec(), sigmask(), sigblock(), │ Thread safety │ MT-Safe │
   │sigsetmask(), siggetmask()       │               │         │


   All of these functions  were  in  4.3BSD,  except  siggetmask(),  whose
   origin  is  unclear.   These functions are obsolete: do not use them in
   new programs.


   On 4.3BSD, the signal() function provided reliable semantics  (as  when
   calling  sigvec()  with vec.sv_mask equal to 0).  On System V, signal()
   provides  unreliable  semantics.   POSIX.1  leaves  these  aspects   of
   signal() unspecified.  See signal(2) for further details.

   In  order  to  wait  for  a  signal,  BSD  and System V both provided a
   function named sigpause(3), but this function has a different  argument
   on the two systems.  See sigpause(3) for details.


   kill(2),  pause(2),  sigaction(2), signal(2), sigprocmask(2), raise(3),
   sigpause(3), sigset(3), signal(7)


   This page is part of release 4.09 of the Linux  man-pages  project.   A
   description  of  the project, information about reporting bugs, and the
   latest    version    of    this    page,    can     be     found     at

More Linux Commands

gv2gml(1) GML-DOT converters (Commands - Linux man page)....
gml2gv converts a graph specified in the GML format to a graph in the GV (formerly DOT) format. gv2gml converts a graph specified in the GV format to a graph in

wbinfo(1) - Query information from winbind daemon (ManPage)
This tool is part of the samba(7) suite. The wbinfo program queries and returns information created and used by the winbindd(8) daemon. The winbindd(8) daemon m

divertctrl.8 (Manual - Linux man page).....................
divertctrl is used to de/activate call diversions and query actual activated diversion rules. The i4l diversion services only work using the (E)DSS1 D-channel p

git-merge-tree(1) - Show three-way merge without touching in
Reads three tree-ish, and output trivial merge results and conflicting stages to the standard output. This is similar to what three-way git read-tree -m does, b

desktop-file-install(1) - Install desktop files (Man Page)
The desktop-file-install program is a tool to install, and optionally edit, desktop files. The desktop-file-edit program is a tool to edit a desktop file. They

Mail::SPF::Mech::IP6(3pm) - SPF record "ip6" mechanism class
An object of class Mail::SPF::Mech::IP6 represents an SPF record mechanism of type ip6. Constructors The following constructors are provided: new(%options): ret

ldap_parse_sasl_bind_result(3) - Parsing results (Man Page)
These routines are used to extract information from a result message. They will operate on the first result message in a chain of search results (skipping past

XConfigureEvent(3) - ConfigureNotify event structure........
The structure for ConfigureNotify events contains: typedef struct { int type; /* ConfigureNotify */ unsigned long serial; /* # of last request processed by serv

epoll_wait(2) - wait for an I/O event on an epoll file descr
The epoll_wait() system call waits for events on the epoll(7) instance referred to by the file descriptor epfd. The memory area pointed to by events will contai

XRRQueryVersion(3) - X Resize, Rotate and Reflection extensi
Xrandr is a simple library designed to interface the X Resize and Rotate Extension. This allows clients to change the size and rotation of the root window of a

ldap_abandon_ext(3) - Abandon an LDAP operation in progress
The ldap_abandon_ext() routine is used to send a LDAP Abandon request for an operation in progress. The msgid passed should be the message id of an outstanding

combinedeltarpm(8) - combine multiple deltarpms to a single
combinedeltarpm creates a new deltarpm from multiple old ones. Applying the rsulting deltarpm has the same effect as applying each of the old ones in the specif

We can't live, work or learn in freedom unless the software we use is free.