]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/raise.3
_exit.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres...
[thirdparty/man-pages.git] / man3 / raise.3
CommitLineData
f37855d1 1.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
031cb604 2.\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
fea681da 3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
c13182ef 13.\"
fea681da
MK
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
c13182ef 21.\"
fea681da
MK
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
c08df37a 25.\"
fea681da
MK
26.\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu)
27.\" Modified 1995 by Mike Battersby (mib@deakin.edu.au)
28.\"
460495ca 29.TH RAISE 3 2015-08-08 "GNU" "Linux Programmer's Manual"
fea681da 30.SH NAME
031cb604 31raise \- send a signal to the caller
fea681da
MK
32.SH SYNOPSIS
33.nf
34.B #include <signal.h>
68e4db0a 35.PP
fea681da
MK
36.BI "int raise(int " sig );
37.fi
38.SH DESCRIPTION
c13182ef 39The
63aa9df0 40.BR raise ()
031cb604
MK
41function sends a signal to the calling process or thread.
42In a single-threaded program it is equivalent to
fea681da 43.sp
031cb604
MK
44.in +4n
45.nf
46kill(getpid(), sig);
47.fi
48.in
49.PP
50In a multithreaded program it is equivalent to
51.sp
52.in +4n
53.nf
54pthread_kill(pthread_self(), sig);
55.fi
56.in
57.PP
58If the signal causes a handler to be called,
2737254c 59.BR raise ()
33a0ccb2 60will return only after the signal handler has returned.
47297adb 61.SH RETURN VALUE
2737254c 62.BR raise ()
c7094399 63returns 0 on success, and nonzero for failure.
3e722e9e 64.SH ATTRIBUTES
866807a6
PH
65For an explanation of the terms used in this section, see
66.BR attributes (7).
67.TS
68allbox;
69lb lb lb
70l l l.
71Interface Attribute Value
72T{
3e722e9e 73.BR raise ()
866807a6
PH
74T} Thread safety MT-Safe
75.TE
47297adb 76.SH CONFORMING TO
8321d668 77POSIX.1-2001, POSIX.1-2008, C89, C99.
f24766e3
MK
78.SH NOTES
79Since version 2.3.3, glibc implements
80.BR raise ()
81by calling
82.BR tgkill (2),
83.\" 2.3.2 used the obsolete tkill(), if available.
84if the kernel supports that system call.
85Older glibc versions implemented
86.BR raise ()
87using
88.BR kill (2).
47297adb 89.SH SEE ALSO
fea681da
MK
90.BR getpid (2),
91.BR kill (2),
031cb604 92.BR sigaction (2),
f0c34053 93.BR signal (2),
baf17bc4 94.BR pthread_kill (3),
031cb604 95.BR signal (7)