IPB
>  Man Pages > Linux > Suse Linux 10.1 > Section 3 > sigvec man page

sigvec man page

Section 3 - Suse Linux 10.1 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


SIGVEC(2)                  Linux Programmer's Manual                 SIGVEC(2)




NAME

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


SYNOPSIS

       #define _BSD_SOURCE
       #include <signal.h>

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

       int sigmask(int signum);

       int sigblock(int mask);

       int sigsetmask(int mask);

       int siggetmask(void);


DESCRIPTION

       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 (sigac
       tion(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
       ovec.

       The dispositions for SIGKILL and SIGSTOP cannot be changed.

       The sigvec structure has the following form:

       struct sigvec {
           void (*sv_handler)();  /* 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; or 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 by default.  Attempts to  block  SIGKILL  or  SIGSTOP  are
       silently ignored.

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

       SV_INTERRUPT
              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
              default.

       SV_RESETHAND
              Reset the disposition of the signal to the default before  call-
              ing 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 execve(2).

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

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

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

       The  sigblock() function adds the signals in mask to the process's sig-
       nal 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).


RETURN VALUE

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

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


ERRORS

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


NOTES

       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-2001 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  func-
       tion  named  sigpause(),  but this function has a different argument on
       the two systems.  See sigpause(3) for details.


CONFORMING TO

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


SEE ALSO

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



Linux 2.6.14                      2005-12-01                         SIGVEC(2)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Tue Feb 13 02:18:35 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

sqlite3 man page (5323 hits)
(openSUSE 10.2)

svn man page (5173 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (4865 hits)
(Solaris 10 11_06)

CPAN man page (4602 hits)
(Suse Linux 10.1)

ssh man page (4337 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (2841 hits)
(Solaris 10 11_06)

netcat man page (2688 hits)
(Suse Linux 10.1)

pprosetup man page (2473 hits)
(Solaris 10 11_06)

startproc man page (2455 hits)
(Suse Linux 10.1)

signal man page (2394 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Summer Activities :: Illuminated Touch Panel :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum