--- ray/src/rt/rpmain.c 2003/06/05 19:29:34 2.3 +++ ray/src/rt/rpmain.c 2003/06/26 00:58:10 2.4 @@ -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.4 2003/06/26 00:58:10 schorsch Exp $"; #endif /* * rpmain.c - main for rpict batch rendering program @@ -9,6 +9,9 @@ static const char RCSid[] = "$Id: rpmain.c,v 2.3 2003/ #include #include +#ifdef _WIN32 + #include /* getpid */ +#endif #include "platform.h" #include "ray.h" @@ -228,10 +231,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"); @@ -392,8 +401,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");