The Open Group Base Specifications Issue 8
IEEE Std 1003.1-2024
Copyright © 2001-2024 The IEEE and The Open Group

NAME

raise — send a signal to the executing process

SYNOPSIS

#include <signal.h>

int raise(int
sig);

DESCRIPTION

[CX] [Option Start] 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-2024 defers to the ISO C standard. [Option End]

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

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

pthread_kill(pthread_self(), sig);
[Option End]

RETURN VALUE

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

ERRORS

The raise() function shall fail if:

[EINVAL]
[CX] [Option Start] The value of the sig argument is an invalid signal number. [Option End]

The following sections are informative.

EXAMPLES

None.

APPLICATION USAGE

None.

RATIONALE

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

FUTURE DIRECTIONS

None.

SEE ALSO

kill, sigaction

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

CHANGE HISTORY

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

Issue 5

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

Issue 6

Extensions beyond the ISO C standard are marked.

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

Issue 7

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

End of informative text.

 

return to top of page

UNIX® is a registered Trademark of The Open Group.
POSIX™ is a Trademark of The IEEE.
Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved
[ Main Index | XBD | XSH | XCU | XRAT ]