--- ray/src/rt/rpmain.c 2003/06/05 19:29:34 2.3 +++ ray/src/rt/rpmain.c 2003/07/03 18:03:58 2.5 @@ -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.5 2003/07/03 18:03:58 greg 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"); @@ -283,7 +292,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 +400,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");