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

Comparing ray/src/hd/rholo2l.c (file contents):
Revision 3.5 by gregl, Mon Nov 24 15:18:47 1997 UTC vs.
Revision 3.6 by gregl, Mon Dec 1 16:32:49 1997 UTC

# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ SGI";
10  
11   #include "rholo.h"
12   #include "random.h"
13 + #include "paths.h"
14   #include "selcall.h"
15   #include <signal.h>
16   #include <sys/time.h>
# Line 18 | Line 19 | static char SCCSid[] = "$SunId$ SGI";
19   #define MAXPROC         16
20   #endif
21  
22 < static char     PFILE[] = "/usr/tmp/RHpersist"; /* persist file name */
22 > static char     pfile[] = TEMPLATE;             /* persist file name */
23  
24   static int      rtpd[MAXPROC][3];               /* process descriptors */
25   static float    *rtbuf = NULL;                  /* allocated i/o buffer */
# Line 54 | Line 55 | start_rtrace()                 /* start rtrace process */
55          rtargv[rtargc++] = "-x"; rtargv[rtargc++] = buf1;
56          rtargv[rtargc++] = "-y"; rtargv[rtargc++] = "0";
57          rtargv[rtargc++] = "-fff";
58 <        rtargv[rtargc++] = "-ovL";
58 >        rtargv[rtargc++] = vbool(VDIST) ? "-ovl" : "-ovL";
59          rtargv[rtargc++] = nowarn ? "-w-" : "-w+";
60          if (npt > 1) {
61 <                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = PFILE;
61 >                mktemp(pfile);
62 >                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = pfile;
63          }
64          rtargv[rtargc++] = vval(OCTREE);
65          rtargv[rtargc] = NULL;
# Line 291 | Line 293 | killpersist()                  /* kill persistent process */
293          FILE    *fp;
294          int     pid;
295  
296 <        if ((fp = fopen(PFILE, "r")) == NULL)
296 >        if ((fp = fopen(pfile, "r")) == NULL)
297                  return;
298          if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGALRM) < 0)
299 <                unlink(PFILE);
299 >                unlink(pfile);
300          fclose(fp);
301   }
302  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines