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