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

Comparing ray/src/rt/rpmain.c (file contents):
Revision 2.3 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.7 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include  <signal.h>
12  
13   #include  "platform.h"
14 + #include  "rtprocess.h" /* getpid() */
15   #include  "ray.h"
16   #include  "source.h"
17   #include  "ambient.h"
# Line 228 | Line 229 | char  *argv[];
229          initurand(2048);
230                                          /* set up signal handling */
231          sigdie(SIGINT, "Interrupt");
232 + #ifdef SIGHUP
233          sigdie(SIGHUP, "Hangup");
234 + #endif
235          sigdie(SIGTERM, "Terminate");
236 + #ifdef SIGPIPE
237          sigdie(SIGPIPE, "Broken pipe");
238 + #endif
239 + #ifdef SIGALRM
240          sigdie(SIGALRM, "Alarm clock");
241 + #endif
242   #ifdef  SIGXCPU
243          sigdie(SIGXCPU, "CPU limit exceeded");
244          sigdie(SIGXFSZ, "File size exceeded");
# Line 283 | Line 290 | char  *argv[];
290          if (loadflags & IO_INFO) {      /* print header */
291                  printargs(i, argv, stdout);
292                  printf("SOFTWARE= %s\n", VersionID);
286                fputnow(stdout);
293          }
294  
295          marksources();                  /* find and mark sources */
# Line 312 | Line 318 | char  *argv[];
318                  }
319          }
320   runagain:
321 <        if (persist)
321 >        if (persist) {
322                  if (outfile == NULL)                    /* if out to stdout */
323                          dupheader();                    /* send header */
324                  else                                    /* if out to file */
325                          duped1 = dup(fileno(stdout));   /* hang onto pipe */
326 +        }
327   #endif
328                                          /* batch render picture(s) */
329          rpict(seqstart, outfile, zfile, recover);
# Line 392 | Line 399 | int  signo;
399          if (gotsig++)                   /* two signals and we're gone! */
400                  _exit(signo);
401  
402 + #ifdef SIGALRM /* XXX how critical is this? */
403          alarm(15);                      /* allow 15 seconds to clean up */
404          signal(SIGALRM, SIG_DFL);       /* make certain we do die */
405 + #endif
406          eputs("signal - ");
407          eputs(sigerr[signo]);
408          eputs("\n");
# Line 415 | Line 424 | char  *msg;
424   void
425   printdefaults()                 /* print default values to stdout */
426   {
418        register char  *cp;
419
427          printf("-vt%c\t\t\t\t# view type %s\n", ourview.type,
428                          ourview.type==VT_PER ? "perspective" :
429                          ourview.type==VT_PAR ? "parallel" :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines