/* * SPDsoft */ #include #include #include #include #include void rserv(int i); int main ( int argc, char *argv[]); char *progname; int count=0; void rserv(int i) { fprintf(stderr,"%s: got: %d\n",progname,i); fflush(stderr); raise(11); return; } int main ( int argc, char *argv[]) { int i; unsigned int s; void (*sys)(int); progname = argv[0]; if ( SIG_ERR == (sys = signal(SIGSEGV, rserv))) fprintf(stderr,"%s: Error: %s\n",argv[0],strerror(errno)); execvp( argv[1], &argv[1]); return 1; }