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

  man pages->Tru64 Unix man pages -> sigvec (2)              
Title
Content
Arch
Section
 

sigvec(2)

Contents


NAME    [Toc]    [Back]

       sigvec  -  Provide a compatibility interface to the sigaction()
 function

SYNOPSIS    [Toc]    [Back]

       #include <sys/signal.h>

       int sigvec(
               int signal,
               struct sigvec *in_vec,
               struct sigvec *out_vec );

PARAMETERS    [Toc]    [Back]

       Specifies the signal number.  Points to a sigvec structure
       that  specifies  the action to be taken when the specified
       signal is delivered, the mask to be used when calling  the
       signal handler, and the flags that modify signal behavior.
       Points to a sigvec structure that is set to  the  previous
       signal action state on successful return from the sigvec()
       function.

DESCRIPTION    [Toc]    [Back]

       The sigvec() function is provided for  compatibility  with
       old  UNIX  systems; its function is a subset of the operations
 available with the sigaction()  function.  Like  the
       sigaction()  function,  the  sigvec()  function allows the
       user to set the action to take upon the receipt of a  signal
  and to specify a signal handler mask to block signals
       before calling the signal handler.  However, only  signals
       with  values  1  to 31 can be masked on entry to a signalhandler
 set up with the sigvec() function.

       The sigvec structure has the following members:

       void (*sv_handler)(); int   sv_mask; int   sv_flags;

       The sv_handler field specifies the action for the  signal,
       and  can  be  SIG_DFL, SIG_IGN, or the address of a signal
       handler function.  See  the  sigaction()  function  for  a
       detailed description of the signal actions.

       The sv_mask field specifies a mask which specifies signals
       to block (in addition to any signals  already  blocked  at
       time  of  delivery)  when  the  signal handler function is
       called for the signal.  Signal i is blocked  if  the  i-th
       bit  of  the mask is set. Only signals with values 1 to 31
       can be masked with the  sigvec()  function.  The  sv_flags
       field contains flags that further specify signal behavior.
       If SV_ONSTACK is set, the signal handler runs on the  signal
 stack specified by the sigstack() function; otherwise,
       the signal handler  runs  on  the  stack  of  the  process
       receiving  the  signal.  If  SV_INTERRUPT is set, a system
       call that is interrupted by signal returns a value  of  -1
       with errno set to [EINTR]; otherwise, a system call interrupted
 by signal is restarted.

       If the value of the in_vec parameter is  a  null  pointer,
       then  the  signal  handler  information is not set. If the
       value of the out_vec parameter is null, then the  previous
       signal handler information is not returned.

       Once  a  signal  handler  is assigned, it remains assigned
       until another call to sigvec() is made or a call  is  made
       to signal(), sigaction() or one of the exec functions.

NOTES    [Toc]    [Back]

       The  sigvec() function is provided for compatibility only,
       and its use is not recommended. Programs  should  use  the
       sigaction() function instead.

       The  sigvec()  function does not check the validity of the
       sv_handler field pointer. If it points to a location  outside
  of the process address space, the process receives a
       memory fault when the system attempts to call  the  signal
       handler.  If the sv_handler field points to anything other
       than a function, the results are unpredictable.

       The signal-handler function can be declared as follows:

       void handler (
               int signal );

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  a  value  of  0  (zero)  is
       returned. If the sigvec() function fails, a value of -1 is
       returned and errno is set to indicate the error.

ERRORS    [Toc]    [Back]

       If the sigvec() function fails, no new signal  handler  is
       installed  and  errno  may  be set to one of the following
       values: The in_vec or out_vec parameter points to a  location
  outside  of  the process' address space.  The signal
       parameter is not a valid signal number or an  attempt  was
       made to ignore or supply a handler for the SIGKILL signal.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: kill(2), ptrace(2), sigaction(2),  sigblock(2),
       sigpause(3), sigstack(2)



                                                        sigvec(2)
[ Back ]
 Similar pages
Name OS Title
sigpause Tru64 Provide a compatibility interface to the sigsuspend function
sigblock Tru64 Provide a compatibility interface to the sigprocmask function
libpw Tru64 Provide functions for compatibility with existing programs
libPW Tru64 Provide functions for compatibility with existing programs
Programmers_Workbench_Library Tru64 Provide functions for compatibility with existing programs
gss_open Tru64 Application Security SDK supports this function only for compatibility. This function is not require...
gss_close Tru64 Application Security SDK supports this function only for compatibility. This function is not require...
sttyV6 HP-UX terminal interface for Version 6/PWB compatibility
sttyv6 HP-UX terminal interface for Version 6/PWB compatibility
stty HP-UX terminal interface for Version 6/PWB compatibility
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service