ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/mkillum.c
(Generate patch)

Comparing ray/src/gen/mkillum.c (file contents):
Revision 2.23 by greg, Thu Oct 28 00:50:47 2004 UTC vs.
Revision 2.25 by greg, Thu May 26 14:46:21 2005 UTC

# Line 9 | Line 9 | static const char RCSid[] = "$Id$";
9   #include  <ctype.h>
10  
11   #include  "platform.h"
12 #include  "rtprocess.h"
12   #include  "mkillum.h"
13   #include  "random.h"
14  
# Line 214 | Line 213 | init(int np)                           /* start rtrace and set up buffers */
213          ofun[OBJ_SPHERE].funp = o_sphere;
214          ofun[OBJ_RING].funp = o_ring;
215                                          /* set up signal handling */
216 < #ifdef SIGPIPE /* not present on Windows */
216 >        signal(SIGINT, quit);
217 > #ifdef SIGHUP
218 >        signal(SIGHUP, quit);
219 > #endif
220 > #ifdef SIGTERM
221 >        signal(SIGTERM, quit);
222 > #endif
223 > #ifdef SIGPIPE
224          signal(SIGPIPE, quit);
225   #endif
226          rtp = &rt0;                     /* start rtrace process(es) */
# Line 228 | Line 234 | init(int np)                           /* start rtrace and set up buffers */
234                  }
235                  if (maxbytes < 0)
236                          error(SYSTEM, "cannot start rtrace process");
231                if (!i && np > 1)
232                        sleep(2);       /* wait for persist file */
237                  rtp->bsiz = maxbytes/(6*sizeof(float));
238                  rtp->buf = (float *)malloc(6*sizeof(float)*rtp->bsiz--);
239                  rtp->dest = (float **)calloc(rtp->bsiz, sizeof(float *));
# Line 238 | Line 242 | init(int np)                           /* start rtrace and set up buffers */
242                  rtp->nrays = 0;
243                  if (i == np)            /* last process? */
244                          break;
245 +                if (np > 1)
246 +                        sleep(2);       /* wait for persist file */
247                  rtp->next = (struct rtproc *)malloc(sizeof(struct rtproc));
248                  if (rtp->next == NULL)
249                          error(SYSTEM, "out of memory in init");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines