malloc_get_state.3: tfix
[man-pages.git] / man3 / raise.3
blobb412e52bddc64155c191dc5a77a14bc9740bc312
1 '\" t
2 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu)
8 .\" Modified 1995 by Mike Battersby (mib@deakin.edu.au)
9 .\"
10 .TH raise 3 (date) "Linux man-pages (unreleased)"
11 .SH NAME
12 raise \- send a signal to the caller
13 .SH LIBRARY
14 Standard C library
15 .RI ( libc ", " \-lc )
16 .SH SYNOPSIS
17 .nf
18 .B #include <signal.h>
20 .BI "int raise(int " sig );
21 .fi
22 .SH DESCRIPTION
23 The
24 .BR raise ()
25 function sends a signal to the calling process or thread.
26 In a single-threaded program it is equivalent to
28 .in +4n
29 .EX
30 kill(getpid(), sig);
31 .EE
32 .in
34 In a multithreaded program it is equivalent to
36 .in +4n
37 .EX
38 pthread_kill(pthread_self(), sig);
39 .EE
40 .in
42 If the signal causes a handler to be called,
43 .BR raise ()
44 will return only after the signal handler has returned.
45 .SH RETURN VALUE
46 .BR raise ()
47 returns 0 on success, and nonzero for failure.
48 .SH ATTRIBUTES
49 For an explanation of the terms used in this section, see
50 .BR attributes (7).
51 .TS
52 allbox;
53 lbx lb lb
54 l l l.
55 Interface       Attribute       Value
57 .na
58 .nh
59 .BR raise ()
60 T}      Thread safety   MT-Safe
61 .TE
62 .SH STANDARDS
63 C11, POSIX.1-2008.
64 .SH HISTORY
65 POSIX.1-2001, C89.
67 Since glibc 2.3.3,
68 .BR raise ()
69 is implemented by calling
70 .BR tgkill (2),
71 .\" 2.3.2 used the obsolete tkill(), if available.
72 if the kernel supports that system call.
73 Older glibc versions implemented
74 .BR raise ()
75 using
76 .BR kill (2).
77 .SH SEE ALSO
78 .BR getpid (2),
79 .BR kill (2),
80 .BR sigaction (2),
81 .BR signal (2),
82 .BR pthread_kill (3),
83 .BR signal (7)