.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
.\" This replaces an earlier man page written by Walter Harms
.\" <walter.harms@informatik.uni-oldenburg.de>.
.TH GSIGNAL 3  2007-07-26 "" "Linux Programmer's Manual"
.SH NAME
gsignal, ssignal \- software signal facility
.SH SYNOPSIS
.nf
.B #include <signal.h>
.sp
.B typedef void (*sighandler_t)(int);
.sp
.BI "int gsignal(int " signum );
.sp
.BI "sighandler_t ssignal(int " signum ", sighandler_t " action );
.fi
.sp
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
.sp
.BR gsignal (),
.BR ssignal ():
_SVID_SOURCE
.SH DESCRIPTION
Don't use these functions under Linux.
Due to a historical mistake, under Linux these functions are
aliases for
.BR raise (3)
and
.BR signal (2),
respectively.
.LP
Elsewhere, on System V-like systems, these functions implement
software signaling, entirely independent of the classical
.BR signal (2)
and
.BR kill (2)
functions.
The function
.BR ssignal ()
defines the action to take when the software signal with
number
.I signum
is raised using the function
.BR gsignal (),
and returns the previous such action or
.BR SIG_DFL .
The function
.BR gsignal ()
does the following: if no action (or the action
.BR SIG_DFL )
was
specified for
.IR signum ,
then it does nothing and returns 0.
If the action
.B SIG_IGN
was specified for
.IR signum ,
then it does nothing and returns 1.
Otherwise, it resets the action to
.B SIG_DFL
and calls
the action function with argument
.IR signum ,
and returns the value returned by that function.
The range of possible values
.I signum
varies (often 1-15 or 1-17).
.SH CONFORMING TO
These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
They are called obsolete under most of these systems, and are
broken under Linux libc and glibc.
Some systems also have
.BR gsignal_r ()
and
.BR ssignal_r ().
.SH SEE ALSO
.BR kill (2),
.BR signal (2),
.BR raise (3)
.SH COLOPHON
This page is part of release 3.53 of the Linux
.I man-pages
project.
A description of the project,
and information about reporting bugs,
can be found at
\%http://www.kernel.org/doc/man\-pages/.
