static char Sccsid
[] = "@(#)setsig.c 1.3 %G%";
# include "../hdr/macros.h"
#define syswrite(a,b,c) syscall(SYS_write,a,b,c)
General-purpose signal setting routine.
All non-ignored, non-caught signals are caught.
If a signal other than hangup, interrupt, or quit is caught,
a "user-oriented" message is printed on file descriptor 2 with
If hangup, interrupt or quit is caught, that signal
Termination is like that of "fatal",
via "clean_up(sig)" (sig is the signal number)
If the file "dump.core" exists in the current directory
suicide to produce a core dump
(after calling clean_up, but before calling userexit).
static char preface
[] = "SIGNAL: ";
static char endmsg
[] = " (ut12)\n";
syswrite(2,preface
,length(preface
));
syswrite(2,Mesg
[sig
],length(Mesg
[sig
]));
syswrite(2,endmsg
,length(endmsg
));
if(open("dump.core",0) > 0) {