]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/gsignal.3
0e6de0927fae3741fcf40b03c1d3fda401bdc01b
[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 2002-08-25 "" "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(" signum );
35 .sp
36 .BI "sighandler_t ssignal(int " signum ", sighandler_t " action );
37 .SH DESCRIPTION
38 Don't use these functions under Linux.
39 Due to a historical mistake, under Linux these functions are
40 aliases for
41 .BR raise (3)
42 and
43 .BR signal (2),
44 respectively.
45 .LP
46 Elsewhere, on System V-like systems, these functions implement
47 software signalling, entirely independent of the classical
48 signal and kill functions.
49 The function
50 .BR ssignal ()
51 defines the action to take when the software signal with
52 number
53 .I signum
54 is raised using the function
55 .BR gsignal (),
56 and returns the previous such action or SIG_DFL.
57 The function
58 .BR gsignal ()
59 does the following: if no action (or the action SIG_DFL) was
60 specified for
61 .IR signum ,
62 then it does nothing and returns 0.
63 If the action SIG_IGN was specified for
64 .IR signum ,
65 then it does nothing and returns 1.
66 Otherwise, it resets the action to SIG_DFL and calls
67 the action function with parameter
68 .IR signum ,
69 and returns the value returned by that function.
70 The range of possible values
71 .I signum
72 varies (often 1-15 or 1-17).
73 .SH "CONFORMING TO"
74 These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
75 They are called obsolete under most of these systems, and are
76 broken under Linux libc and glibc.
77 Some systems also have
78 .BR gsignal_r ()
79 and
80 .BR ssignal_r ().
81 .SH "SEE ALSO"
82 .BR kill (2),
83 .BR signal (2),
84 .BR raise (3)