summaryrefslogtreecommitdiffstats
path: root/man3/gsignal.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/gsignal.3')
-rw-r--r--man3/gsignal.3119
1 files changed, 119 insertions, 0 deletions
diff --git a/man3/gsignal.3 b/man3/gsignal.3
new file mode 100644
index 0000000..4587650
--- /dev/null
+++ b/man3/gsignal.3
@@ -0,0 +1,119 @@
+'\" t
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.TH gsignal 3 2023-07-20 "Linux man-pages 6.05.01"
+.SH NAME
+gsignal, ssignal \- software signal facility
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <signal.h>
+.PP
+.B typedef void (*sighandler_t)(int);
+.PP
+.BI "[[deprecated]] int gsignal(int " signum );
+.PP
+.BI "[[deprecated]] sighandler_t ssignal(int " signum ", sighandler_t " action );
+.fi
+.PP
+.RS -4
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.RE
+.PP
+.BR gsignal (),
+.BR ssignal ():
+.nf
+ Since glibc 2.19:
+ _DEFAULT_SOURCE
+ glibc 2.19 and earlier:
+ _SVID_SOURCE
+.fi
+.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.
+.PP
+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\[en]15 or 1\[en]17).
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR gsignal ()
+T} Thread safety MT-Safe
+T{
+.na
+.nh
+.BR ssignal ()
+T} Thread safety MT-Safe sigintr
+.TE
+.sp 1
+.SH STANDARDS
+None.
+.SH HISTORY
+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)