--- ray/src/gen/mkillum.c 2004/10/28 00:50:47 2.23 +++ ray/src/gen/mkillum.c 2005/05/26 14:46:21 2.25 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: mkillum.c,v 2.23 2004/10/28 00:50:47 greg Exp $"; +static const char RCSid[] = "$Id: mkillum.c,v 2.25 2005/05/26 14:46:21 greg Exp $"; #endif /* * Make illum sources for optimizing rendering process @@ -9,7 +9,6 @@ static const char RCSid[] = "$Id: mkillum.c,v 2.23 200 #include #include "platform.h" -#include "rtprocess.h" #include "mkillum.h" #include "random.h" @@ -214,7 +213,14 @@ init(int np) /* start rtrace and set up buffers */ ofun[OBJ_SPHERE].funp = o_sphere; ofun[OBJ_RING].funp = o_ring; /* set up signal handling */ -#ifdef SIGPIPE /* not present on Windows */ + signal(SIGINT, quit); +#ifdef SIGHUP + signal(SIGHUP, quit); +#endif +#ifdef SIGTERM + signal(SIGTERM, quit); +#endif +#ifdef SIGPIPE signal(SIGPIPE, quit); #endif rtp = &rt0; /* start rtrace process(es) */ @@ -228,8 +234,6 @@ init(int np) /* start rtrace and set up buffers */ } if (maxbytes < 0) error(SYSTEM, "cannot start rtrace process"); - if (!i && np > 1) - sleep(2); /* wait for persist file */ rtp->bsiz = maxbytes/(6*sizeof(float)); rtp->buf = (float *)malloc(6*sizeof(float)*rtp->bsiz--); rtp->dest = (float **)calloc(rtp->bsiz, sizeof(float *)); @@ -238,6 +242,8 @@ init(int np) /* start rtrace and set up buffers */ rtp->nrays = 0; if (i == np) /* last process? */ break; + if (np > 1) + sleep(2); /* wait for persist file */ rtp->next = (struct rtproc *)malloc(sizeof(struct rtproc)); if (rtp->next == NULL) error(SYSTEM, "out of memory in init");