]>
Commit | Line | Data |
---|---|---|
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 | 31 | raise \- 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 | 39 | The |
63aa9df0 | 40 | .BR raise () |
031cb604 MK |
41 | function sends a signal to the calling process or thread. |
42 | In a single-threaded program it is equivalent to | |
bdd915e2 | 43 | .PP |
031cb604 | 44 | .in +4n |
bdd915e2 | 45 | .EX |
031cb604 | 46 | kill(getpid(), sig); |
bdd915e2 | 47 | .EE |
031cb604 MK |
48 | .in |
49 | .PP | |
50 | In a multithreaded program it is equivalent to | |
bdd915e2 | 51 | .PP |
031cb604 | 52 | .in +4n |
bdd915e2 | 53 | .EX |
031cb604 | 54 | pthread_kill(pthread_self(), sig); |
bdd915e2 | 55 | .EE |
031cb604 MK |
56 | .in |
57 | .PP | |
58 | If the signal causes a handler to be called, | |
2737254c | 59 | .BR raise () |
33a0ccb2 | 60 | will return only after the signal handler has returned. |
47297adb | 61 | .SH RETURN VALUE |
2737254c | 62 | .BR raise () |
c7094399 | 63 | returns 0 on success, and nonzero for failure. |
3e722e9e | 64 | .SH ATTRIBUTES |
866807a6 PH |
65 | For an explanation of the terms used in this section, see |
66 | .BR attributes (7). | |
67 | .TS | |
68 | allbox; | |
69 | lb lb lb | |
70 | l l l. | |
71 | Interface Attribute Value | |
72 | T{ | |
3e722e9e | 73 | .BR raise () |
866807a6 PH |
74 | T} Thread safety MT-Safe |
75 | .TE | |
47297adb | 76 | .SH CONFORMING TO |
8321d668 | 77 | POSIX.1-2001, POSIX.1-2008, C89, C99. |
f24766e3 MK |
78 | .SH NOTES |
79 | Since version 2.3.3, glibc implements | |
80 | .BR raise () | |
81 | by calling | |
82 | .BR tgkill (2), | |
83 | .\" 2.3.2 used the obsolete tkill(), if available. | |
84 | if the kernel supports that system call. | |
85 | Older glibc versions implemented | |
86 | .BR raise () | |
87 | using | |
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) |