If the function is called with POSIX functionality, its behavior conforms with XPG4 as described below:
raise()
sends the signal sig to the calling process. The defined signals are listed in signal.h
.
If threads are used, then the function affects the process or a thread in the following manner:
Sends a signal to the calling thread. The effect of raise(sig)
is equivalent to calling pthread_kill(pthread_self()
, sig
).
BS2000
The following deviations in behavior must be noted if the function is called with BS2000 functionality:
raise()
can be used to simulate STXIT events as well as to send STXIT-independent signals (self-defined or predefined by the C runtime system).
The following subset of the signals defined in signal.h
may be used for sig:
Signal | STXIT class | Meaning |
SIGHUP
| ABEND
| Disconnection of link to terminal |
SIGINT
| ESCPBRK
| Interrupt from the terminal with [K2] |
SIGILL
| PROCHK
| Execution of an invalid instruction |
SIGABRT
| -
| raise signal for program abort with _exit(-1)
|
SIGFPE
| PROCHK
| Error in a floating-point operation |
SIGKILL
| -
| raise signal for program abort with exit(-1)
|
SIGSEGV
| ERROR
| Memory access with invalid segment access |
SIGALRM
| RTIMER
| A time interval has elapsed (real time) |
SIGTERM
| TERM
| Signal at program termination |
SIGUSR1
| -
| Defined by the user |
SIGUSR2
| -
| Defined by the user |
SIGDVZ
| PROCHK
| Division by 0 |
SIGXCPU
| RUNOUT
| CPU time has run out |
SIGTIM
| TIMER
| A time interval has elapsed (CPU time) |
SIGINTR
| INTR
| SEND-MESSAGE command |
(End)