Sends a signal to the currently running program.
Standard C Library (libc.a)
Threads Library (libpthreads.a)
int raise (Signal) int Signal;
The raise subroutine sends the signal specified by the Signal parameter to the executing process or thread, depending if the POSIX threads API (the libpthreads.a library) is used or not. When the program is not linked with the threads library, the raise subroutine sends the signal to the calling process as follows:
return kill(getpid(), Signal);
When the program is linked with the threads library, the raise subroutine sends the signal to the calling thread as follows:
return pthread_kill(pthread_self(), Signal);
|Signal||Specifies a signal number.|
Upon successful completion of the raise subroutine, a value of 0 is returned. Otherwise, a nonzero value is returned, and the errno global variable is set to indicate the error.
|EINVAL||The value of the sig argument is an invalid signal number|
This subroutine is part of Base Operating System (BOS) Runtime.
When using the threads library, it is important to ensure that the threads library is linked before the standard C library.
The _exit subroutine, kill subroutine, pthread_kill subroutine, sigaction subroutine.
Signal Management in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs provides more information about signal management in multi-threaded processes.