# Unix signals usage

On Unix the Modula-3 runtime catches seven signals: `SIGHUP`, `SIGINT`, `SIGTERM`, `SIGQUIT`, `SIGSEGV`, `SIGPIPE`, and `SIGVTALRM`. Otherwise, the runtime leaves the default Unix signal handlers unaltered.

`SIGHUP`(``hang up''), `SIGINT`(``interrupt''), and `SIGTERM`(``terminate'') all indicate that the program is to stop. The Modula-3 runtime calls its usual clean-up routines and exits.

`SIGQUIT` is like the above, except the runtime prints the error message ``aborted'', and attempts to crash with a ``core file''.

`SIGSEGV` indicates a ``segmentation violation'' and is often signaled when a process dereferences `NIL`. The runtime catches `SIGSEGV`, prints an error message, and attempts to crash with a ``core file''.

`SIGPIPE` indicates a ``broken pipe''. The runtime ignores the signal and when next accessed, any reader(writer) that was using the pipe will raise `Rd.Failure`(`Wr.Failure`).

`SIGVTALRM` is the ``virtual timer alarm''. It is used to periodically preempt the running thread.

    Last modified on Thu Jan  4 11:07:57 PST 1996 by heydon
         modified on Fri Apr 22 11:45:04 PDT 1994 by kalsow
         modified on Thu Jan  7 18:40:57 PST 1993 by muller