]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/gsignal.3
Fix redundant formatting macros
[thirdparty/man-pages.git] / man3 / gsignal.3
1 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" This replaces an earlier man page written by Walter Harms
24 .\" <walter.harms@informatik.uni-oldenburg.de>.
25 .TH GSIGNAL 3 2007-07-26 "" "Linux Programmer's Manual"
26 .SH NAME
27 gsignal, ssignal \- software signal facility
28 .SH SYNOPSIS
29 .nf
30 .B #include <signal.h>
31 .sp
32 .B typedef void (*sighandler_t)(int);
33 .sp
34 .BI "int gsignal(int" signum );
35 .sp
36 .BI "sighandler_t ssignal(int " signum ", sighandler_t " action );
37 .fi
38 .sp
39 .in -4n
40 Feature Test Macro Requirements for glibc (see
41 .BR feature_test_macros (7)):
42 .in
43 .sp
44 .BR gsignal (),
45 .BR ssignal ():
46 _SVID_SOURCE
47 .SH DESCRIPTION
48 Don't use these functions under Linux.
49 Due to a historical mistake, under Linux these functions are
50 aliases for
51 .BR raise (3)
52 and
53 .BR signal (2),
54 respectively.
55 .LP
56 Elsewhere, on System V-like systems, these functions implement
57 software signaling, entirely independent of the classical
58 signal and kill functions.
59 The function
60 .BR ssignal ()
61 defines the action to take when the software signal with
62 number
63 .I signum
64 is raised using the function
65 .BR gsignal (),
66 and returns the previous such action or
67 .BR SIG_DFL .
68 The function
69 .BR gsignal ()
70 does the following: if no action (or the action
71 .BR SIG_DFL )
72 was
73 specified for
74 .IR signum ,
75 then it does nothing and returns 0.
76 If the action
77 .B SIG_IGN
78 was specified for
79 .IR signum ,
80 then it does nothing and returns 1.
81 Otherwise, it resets the action to
82 .B SIG_DFL
83 and calls
84 the action function with parameter
85 .IR signum ,
86 and returns the value returned by that function.
87 The range of possible values
88 .I signum
89 varies (often 1-15 or 1-17).
90 .SH "CONFORMING TO"
91 These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
92 They are called obsolete under most of these systems, and are
93 broken under Linux libc and glibc.
94 Some systems also have
95 .BR gsignal_r ()
96 and
97 .BR ssignal_r ().
98 .SH "SEE ALSO"
99 .BR kill (2),
100 .BR signal (2),
101 .BR raise (3)