RAISE(3) Library Functions Manual RAISE(3)

raisesend a signal to the executing process

#include <signal.h>

int raise(int sig);

[CX] The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2008 defers to the ISO C standard.

The raise () function shall send the signal to the executing [CX] thread or process. If a signal handler is called, the raise () function shall not return until after the signal handler does.

[CX] The effect of the raise () function shall be equivalent to calling:

pthread_kill(pthread_self(), sig);

Upon successful completion, 0 shall be returned. Otherwise, a non-zero value shall be returned [CX] and errno shall be set to indicate the error.

The raise () function shall fail if:

[CX] The value of the sig argument is an invalid signal number.

None.

None.

The term "thread" is an extension to the ISO C standard.

None.

kill(3), sigaction(3)

XBD <signal.h>, <sys/types.h>

First released in Issue 4. Derived from the ANSI C standard.

The DESCRIPTION is updated for alignment with the POSIX Threads Extension.

Extensions beyond the ISO C standard are marked.

The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:

  • In the RETURN VALUE section, the requirement to set errno on error is added.
  • The [EINVAL] error condition is added.

Functionality relating to the Threads option is moved to the Base.

January 1, 2016 posix.fail