]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/gsignal.3
proc.5: Note kernel version for /proc/PID/smaps VmFlags "wf" flag
[thirdparty/man-pages.git] / man3 / gsignal.3
index aae5efea6cc903c2b64287167e9ff03e09563b00..b5c744c5d043f8bd7251a7717bcffd1e3e981df2 100644 (file)
@@ -1,5 +1,6 @@
 .\" 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.
 .\"
 .\" 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  2002-08-25 "notGNU" "Linux Programmer's Manual"
+.TH GSIGNAL 3  2020-04-11 "" "Linux Programmer's Manual"
 .SH NAME
 gsignal, ssignal \- software signal facility
 .SH SYNOPSIS
 .nf
 .B #include <signal.h>
-.sp
+.PP
 .B typedef void (*sighandler_t)(int);
-.sp
-.BI "int gsignal(" signum );
-.sp
+.PP
+.BI "int gsignal(int " signum );
+.PP
 .BI "sighandler_t ssignal(int " signum ", sighandler_t " action );
+.fi
+.PP
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.PP
+.BR gsignal (),
+.BR ssignal ():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
 .SH DESCRIPTION
 Don't use these functions under Linux.
 Due to a historical mistake, under Linux these functions are
@@ -42,10 +57,13 @@ aliases for
 and
 .BR signal (2),
 respectively.
-.LP
+.PP
 Elsewhere, on System V-like systems, these functions implement
-software signalling, entirely independent of the classical
-signal and kill functions.
+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
@@ -53,32 +71,57 @@ number
 .I signum
 is raised using the function
 .BR gsignal (),
-and returns the previous such action or SIG_DFL.
+and returns the previous such action or
+.BR SIG_DFL .
 The function
 .BR gsignal ()
-does the following: if no action (or the action SIG_DFL) was
+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 SIG_IGN was specified for
+If the action
+.B SIG_IGN
+was specified for
 .IR signum ,
 then it does nothing and returns 1.
-Otherwise, it resets the action to SIG_DFL and calls
-the action function with parameter
+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"
+varies (often 1\(en15 or 1\(en17).
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR gsignal ()
+T}     Thread safety   MT-Safe
+T{
+.BR ssignal ()
+T}     Thread safety   MT-Safe sigintr
+.TE
+.sp 1
+.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.
+broken under
+.\" Linux libc and
+glibc.
 Some systems also have
 .BR gsignal_r ()
 and
 .BR ssignal_r ().
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR kill (2),
 .BR signal (2),
 .BR raise (3)