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

  man pages->IRIX man pages -> ssignal (3c)              
Title
Content
Arch
Section
 

Contents


SSIGNAL(3C)							   SSIGNAL(3C)


NAME    [Toc]    [Back]

     ssignal, gsignal -	software signals

SYNOPSIS    [Toc]    [Back]

     #include <signal.h>

     int (*ssignal(int sig, int	(*action)(int))(int);

     int gsignal(int sig);

DESCRIPTION    [Toc]    [Back]

     ssignal and gsignal implement a software facility similar to signal(2).
     This facility is used by the Standard C Library to	enable users to
     indicate the disposition of error conditions, and is also made available
     to	users for their	own purposes.

     Software signals made available to	users are associated with integers in
     the inclusive range 1 through 16. A call to ssignal associates a
     procedure,	action,	with the software signal sig; the software signal,
     sig, is raised by a call to gsignal.  Raising a software signal causes
     the action	established for	that signal to be taken.

     The first argument	to ssignal is a	number identifying the type of signal
     for which an action is to be established. The second argument defines the
     action; it	is either the name of a	(user-defined) action function or one
     of	the manifest constants SIG_DFL (default) or SIG_IGN (ignore).  ssignal
     returns the action	previously established for that	signal type; if	no
     action has	been established or the	signal number is illegal, ssignal
     returns SIG_DFL.

     Gsignal raises the	signal identified by its argument, sig:

	  If an	action function	has been established for sig, then that	action
	  is reset to SIG_DFL and the action function is entered with argument
	  sig.	Gsignal	returns	the value returned to it by the	action
	  function.

	  If the action	for sig	is SIG_IGN, gsignal returns the	value 1	and
	  takes	no other action.

	  If the action	for sig	is SIG_DFL, gsignal returns the	value 0	and
	  takes	no other action.

	  If sig has an	illegal	value or no action was ever specified for sig,
	  gsignal returns the value 0 and takes	no other action.

SEE ALSO    [Toc]    [Back]

      
      
     signal(2),	sigset(2).







									Page 1






SSIGNAL(3C)							   SSIGNAL(3C)



NOTES
     There are some additional signals with numbers outside the	range 1
     through 16	which are used by the Standard C Library to indicate error
     conditions.  Thus,	some signal numbers outside the	range 1	through	16 are
     legal, although their use may interfere with the operation	of the
     Standard C	Library.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
sd HP-UX Software Distributor, commands to create, distribute, install, monitor, and manage software
swinstall HP-UX install and configure software products; software products for subsequent installation or distribution; respec
swcopy HP-UX install and configure software products; software products for subsequent installation or distribution; respec
sigblock HP-UX block signals
signal HP-UX description of signals
sigpending OpenBSD get pending signals
sigwait FreeBSD select a set of signals
sigmask OpenBSD block signals
signal Linux list of available signals
sigblock OpenBSD block signals
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service