]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/raise.3
getauxval.3: Clarify that AT_BASE_PLATFORM and AT_EXECFN return pointers to strings
[thirdparty/man-pages.git] / man3 / raise.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
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.
13 .\"
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.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
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 .\"
29 .TH RAISE 3 2015-08-08 "GNU" "Linux Programmer's Manual"
30 .SH NAME
31 raise \- send a signal to the caller
32 .SH SYNOPSIS
33 .nf
34 .B #include <signal.h>
35 .PP
36 .BI "int raise(int " sig );
37 .fi
38 .SH DESCRIPTION
39 The
40 .BR raise ()
41 function sends a signal to the calling process or thread.
42 In a single-threaded program it is equivalent to
43 .PP
44 .in +4n
45 .EX
46 kill(getpid(), sig);
47 .EE
48 .in
49 .PP
50 In a multithreaded program it is equivalent to
51 .PP
52 .in +4n
53 .EX
54 pthread_kill(pthread_self(), sig);
55 .EE
56 .in
57 .PP
58 If the signal causes a handler to be called,
59 .BR raise ()
60 will return only after the signal handler has returned.
61 .SH RETURN VALUE
62 .BR raise ()
63 returns 0 on success, and nonzero for failure.
64 .SH ATTRIBUTES
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{
73 .BR raise ()
74 T} Thread safety MT-Safe
75 .TE
76 .SH CONFORMING TO
77 POSIX.1-2001, POSIX.1-2008, C89, C99.
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).
89 .SH SEE ALSO
90 .BR getpid (2),
91 .BR kill (2),
92 .BR sigaction (2),
93 .BR signal (2),
94 .BR pthread_kill (3),
95 .BR signal (7)