--- ray/src/rt/rpmain.c 2003/06/05 19:29:34 2.3 +++ ray/src/rt/rpmain.c 2003/07/14 20:02:30 2.6 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rpmain.c,v 2.3 2003/06/05 19:29:34 schorsch Exp $"; +static const char RCSid[] = "$Id: rpmain.c,v 2.6 2003/07/14 20:02:30 schorsch Exp $"; #endif /* * rpmain.c - main for rpict batch rendering program @@ -11,6 +11,7 @@ static const char RCSid[] = "$Id: rpmain.c,v 2.3 2003/ #include #include "platform.h" +#include "rtprocess.h" /* getpid() */ #include "ray.h" #include "source.h" #include "ambient.h" @@ -228,10 +229,16 @@ char *argv[]; initurand(2048); /* set up signal handling */ sigdie(SIGINT, "Interrupt"); +#ifdef SIGHUP sigdie(SIGHUP, "Hangup"); +#endif sigdie(SIGTERM, "Terminate"); +#ifdef SIGPIPE sigdie(SIGPIPE, "Broken pipe"); +#endif +#ifdef SIGALRM sigdie(SIGALRM, "Alarm clock"); +#endif #ifdef SIGXCPU sigdie(SIGXCPU, "CPU limit exceeded"); sigdie(SIGXFSZ, "File size exceeded"); @@ -283,7 +290,6 @@ char *argv[]; if (loadflags & IO_INFO) { /* print header */ printargs(i, argv, stdout); printf("SOFTWARE= %s\n", VersionID); - fputnow(stdout); } marksources(); /* find and mark sources */ @@ -392,8 +398,10 @@ int signo; if (gotsig++) /* two signals and we're gone! */ _exit(signo); +#ifdef SIGALRM /* XXX how critical is this? */ alarm(15); /* allow 15 seconds to clean up */ signal(SIGALRM, SIG_DFL); /* make certain we do die */ +#endif eputs("signal - "); eputs(sigerr[signo]); eputs("\n"); @@ -415,8 +423,6 @@ char *msg; void printdefaults() /* print default values to stdout */ { - register char *cp; - printf("-vt%c\t\t\t\t# view type %s\n", ourview.type, ourview.type==VT_PER ? "perspective" : ourview.type==VT_PAR ? "parallel" :