home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum7.lzh
/
RICO
/
MAN
/
man.signal
< prev
next >
Wrap
Text File
|
1988-09-26
|
3KB
|
167 lines
signal() os9-68000 Programmers Manual signal()
NAME
signal - simplified software signal facilities
SYNOPSIS
#include <signal.h>
typedef int (* handler_func)();
handler_func signal(sig,func);
int sig;
handlerfunc func;
DESCRIPTION
A signal is generated by some abnormal event, by an
external signal (keyboard interrupt) or program error
(overflow ...). All signal cause termination of the
receiving process if no action is taken. Except for
SIGKILL, the signal facility allows signals either to be
ignored or to cause an interrupt to some specific location.
The following is a list of all signals as in the include
file <signal.h>:
OS9 signals
SIGKILL 0 System abort (cannot be caught or
ignored)
SIGWAKE 1 Wake up
SIGQUIT 2 Keyboard abort
SIGINT 3 Keyboard interrupt
OS-9 error traps
SIGBUSERR -1 Bus error
SIGBUS -1 Bus error
SIGADDERR -2 Address error
SIGILLINS -3 Illegal instruction
SIGILL -3 Illegal instruction
SIGZERODIV -4 Integer zero division
SIGCHK -5 Range error
SIGTRAPV -6 Overflow
SIGFPE -6 Floating point error
SIGPRIV -7 Privilege violation
SIG1010 -8 1010 opcode emulator
SIG1111 -9 1111 opcode emulator
Special addresses
SIGDFL 0 Default behaviour (exit with error)
SIGIGN 1 Ignore signal
If func is SIGDFL, the default action for signal sig is
taken (exit with error). If func is SIGIGN, the signal is
ignored. Otherwise, when the signal occurs further
occurrences of the signal are automatically blocked and
func is called. A return from the function unblocks the
handled signal and continues the process at the point it
was interrupted. The signal handler func remains installed
after a signal has been delivered. Func is called with the
signal number as int argument. The value of signal is the
previous (or initial) value of func for that signal or -1
in case of an error.
RETURN VALUE
The previous action is returned on a successful call,
otherwise -1 is returned to indicate an error.
LIBRARY
use signal.l
SEE ALSO
intercept() (OS9 Microware C library), F$Icpt (OS9 Technical
manual)
AUTHOR
Rico Cozzio
PROBLEMS
SIGBUS,SIGBUSERR,SIGADDERR may interrupt the process at any
point of opcode execution. So the process interrupted may
not reasonably continue. It is recommended not to return
to the interrupted process, but to abort the program at the
end of the interrupt routine.
signal() page 3