]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl> |
2 | .\" | |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
4 | .\" |
5 | .\" This replaces an earlier man page written by Walter Harms | |
6 | .\" <walter.harms@informatik.uni-oldenburg.de>. | |
4c1c5274 | 7 | .TH gsignal 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
8 | .SH NAME |
9 | gsignal, ssignal \- software signal facility | |
4508f8a0 AC |
10 | .SH LIBRARY |
11 | Standard C library | |
8fc3b2cf | 12 | .RI ( libc ", " \-lc ) |
fea681da MK |
13 | .SH SYNOPSIS |
14 | .nf | |
15 | .B #include <signal.h> | |
68e4db0a | 16 | .PP |
fea681da | 17 | .B typedef void (*sighandler_t)(int); |
68e4db0a | 18 | .PP |
4e4c48e5 | 19 | .BI "[[deprecated]] int gsignal(int " signum ); |
68e4db0a | 20 | .PP |
4e4c48e5 | 21 | .BI "[[deprecated]] sighandler_t ssignal(int " signum ", sighandler_t " action ); |
cc4615cc | 22 | .fi |
68e4db0a | 23 | .PP |
d39ad78f | 24 | .RS -4 |
cc4615cc MK |
25 | Feature Test Macro Requirements for glibc (see |
26 | .BR feature_test_macros (7)): | |
d39ad78f | 27 | .RE |
68e4db0a | 28 | .PP |
cc4615cc MK |
29 | .BR gsignal (), |
30 | .BR ssignal (): | |
9d281e06 | 31 | .nf |
51c612fb MK |
32 | Since glibc 2.19: |
33 | _DEFAULT_SOURCE | |
34 | Glibc 2.19 and earlier: | |
35 | _SVID_SOURCE | |
9d281e06 | 36 | .fi |
fea681da MK |
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 | |
fb186734 | 41 | .BR raise (3) |
fea681da | 42 | and |
fb186734 | 43 | .BR signal (2), |
fea681da | 44 | respectively. |
dd3568a1 | 45 | .PP |
80b50848 | 46 | Elsewhere, on System V-like systems, these functions implement |
d9bfdb9c | 47 | software signaling, entirely independent of the classical |
d9a10d9d MK |
48 | .BR signal (2) |
49 | and | |
50 | .BR kill (2) | |
51 | functions. | |
c13182ef | 52 | The function |
63aa9df0 | 53 | .BR ssignal () |
fea681da MK |
54 | defines the action to take when the software signal with |
55 | number | |
56 | .I signum | |
57 | is raised using the function | |
63aa9df0 | 58 | .BR gsignal (), |
8bd58774 MK |
59 | and returns the previous such action or |
60 | .BR SIG_DFL . | |
fea681da | 61 | The function |
63aa9df0 | 62 | .BR gsignal () |
8bd58774 MK |
63 | does the following: if no action (or the action |
64 | .BR SIG_DFL ) | |
65 | was | |
fea681da MK |
66 | specified for |
67 | .IR signum , | |
68 | then it does nothing and returns 0. | |
8bd58774 | 69 | If the action |
0daa9e92 | 70 | .B SIG_IGN |
8bd58774 | 71 | was specified for |
fea681da MK |
72 | .IR signum , |
73 | then it does nothing and returns 1. | |
8bd58774 | 74 | Otherwise, it resets the action to |
0daa9e92 | 75 | .B SIG_DFL |
8bd58774 | 76 | and calls |
c4bb193f | 77 | the action function with argument |
fea681da MK |
78 | .IR signum , |
79 | and returns the value returned by that function. | |
80 | The range of possible values | |
81 | .I signum | |
9bc87ed0 | 82 | varies (often 1\(en15 or 1\(en17). |
af642253 ZL |
83 | .SH ATTRIBUTES |
84 | For an explanation of the terms used in this section, see | |
85 | .BR attributes (7). | |
c466875e MK |
86 | .ad l |
87 | .nh | |
af642253 ZL |
88 | .TS |
89 | allbox; | |
c466875e | 90 | lbx lb lb |
af642253 ZL |
91 | l l l. |
92 | Interface Attribute Value | |
93 | T{ | |
94 | .BR gsignal () | |
95 | T} Thread safety MT-Safe | |
96 | T{ | |
97 | .BR ssignal () | |
98 | T} Thread safety MT-Safe sigintr | |
99 | .TE | |
c466875e MK |
100 | .hy |
101 | .ad | |
847e0d88 | 102 | .sp 1 |
3113c7f3 | 103 | .SH STANDARDS |
68e1685c | 104 | These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64. |
fea681da | 105 | They are called obsolete under most of these systems, and are |
50fd1cfe MK |
106 | broken under |
107 | .\" Linux libc and | |
108 | glibc. | |
fea681da | 109 | Some systems also have |
31e9a9ec | 110 | .BR gsignal_r () |
fea681da | 111 | and |
31e9a9ec | 112 | .BR ssignal_r (). |
47297adb | 113 | .SH SEE ALSO |
fea681da MK |
114 | .BR kill (2), |
115 | .BR signal (2), | |
116 | .BR raise (3) |