]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/gsignal.3
Import of man-pages 1.70
[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 "notGNU" "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 .I raise()
42 and
43 .IR signal() ,
44 respectively.
45 .LP
46 Elsewhere, on SYSV-like systems, these functions implement
47 software signalling, entirely independent of the classical
48 signal and kill functions. The function
49 .B ssignal()
50 defines the action to take when the software signal with
51 number
52 .I signum
53 is raised using the function
54 .BR gsignal() ,
55 and returns the previous such action or SIG_DFL.
56 The function
57 .B gsignal()
58 does the following: if no action (or the action SIG_DFL) was
59 specified for
60 .IR signum ,
61 then it does nothing and returns 0.
62 If the action SIG_IGN was specified for
63 .IR signum ,
64 then it does nothing and returns 1.
65 Otherwise, it resets the action to SIG_DFL and calls
66 the action function with parameter
67 .IR signum ,
68 and returns the value returned by that function.
69 The range of possible values
70 .I signum
71 varies (often 1-15 or 1-17).
72 .SH "CONFORMING TO"
73 SVID2, XPG2.
74 These functions are available under AIX, DG-UX, HPUX, 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 .I gsignal_r()
79 and
80 .IR ssignal_r() .
81 .SH "SEE ALSO"
82 .BR kill (2),
83 .BR signal (2),
84 .BR raise (3)