1RAISE(3)                   Linux Programmer's Manual                  RAISE(3)
2
3
4

NAME

6       raise - send a signal to the caller
7

SYNOPSIS

9       #include <signal.h>
10
11       int raise(int sig);
12

DESCRIPTION

14       The  raise()  function sends a signal to the calling process or thread.
15       In a single-threaded program it is equivalent to
16
17           kill(getpid(), sig);
18
19       In a multithreaded program it is equivalent to
20
21           pthread_kill(pthread_self(), sig);
22
23       If the signal causes a handler to be called, raise() will  return  only
24       after the signal handler has returned.
25

RETURN VALUE

27       raise() returns 0 on success, and nonzero for failure.
28

ATTRIBUTES

30       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
31       tributes(7).
32
33       ┌────────────────────────────────────────────┬───────────────┬─────────┐
34Interface                                   Attribute     Value   
35       ├────────────────────────────────────────────┼───────────────┼─────────┤
36raise()                                     │ Thread safety │ MT-Safe │
37       └────────────────────────────────────────────┴───────────────┴─────────┘
38

CONFORMING TO

40       POSIX.1-2001, POSIX.1-2008, C89, C99.
41

NOTES

43       Since version 2.3.3, glibc implements raise() by calling tgkill(2),  if
44       the kernel supports that system call.  Older glibc versions implemented
45       raise() using kill(2).
46

SEE ALSO

48       getpid(2), kill(2), sigaction(2), signal(2), pthread_kill(3), signal(7)
49

COLOPHON

51       This page is part of release 5.12 of the Linux  man-pages  project.   A
52       description  of  the project, information about reporting bugs, and the
53       latest    version    of    this    page,    can     be     found     at
54       https://www.kernel.org/doc/man-pages/.
55
56
57
58GNU                               2021-03-22                          RAISE(3)
Impressum