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

Comparing ray/src/rt/persist.c (file contents):
Revision 2.9 by greg, Thu Apr 1 08:55:37 1993 UTC vs.
Revision 2.10 by greg, Fri May 28 13:37:39 1993 UTC

# Line 106 | Line 106 | pfhold()               /* holding pattern for idle rendering proces
106          if (mknod(mktemp(strcpy(outpname,TEMPLATE)), S_IFIFO|0600) < 0)
107                  goto createrr;
108          sprintf(buf, "%d\n%s\n%s\n", getpid(), inpname, outpname);
109 <        if (lseek(persistfd, 0L, 0) < 0)
110 <                error(SYSTEM, "seek error on persist file in pfhold");
109 >        if (lseek(persistfd, 0L, 0) < 0 || ftruncate(persistfd, 0L) < 0)
110 >                error(SYSTEM, "seek/truncate error on persist file");
111          n = strlen(buf);
112          if (write(persistfd, buf, n) < n)
113 <                error(SYSTEM, "error writing persist file in pfhold");
113 >                error(SYSTEM, "error writing persist file");
114                                  /* wait TIMELIM for someone to signal us */
115          signal(SIGIO, sig_noop);
116          alarm(TIMELIM);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines