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

Comparing ray/src/util/rpiece.c (file contents):
Revision 2.53 by greg, Sat Jan 21 22:04:02 2012 UTC vs.
Revision 2.54 by greg, Fri Jun 1 22:55:14 2012 UTC

# Line 235 | Line 235 | dolock(                /* lock or unlock a file */
235          if (fcntl(fd, F_SETLKW, &fls) < 0) {
236                  fprintf(stderr, "%s: cannot lock/unlock file: %s\n",
237                                  progname, strerror(errno));
238 <                exit(1);
238 >                _exit(1);
239          }
240   }
241  
# Line 573 | Line 573 | int    ypos
573                                  /* lock file section so NFS doesn't mess up */
574          fls.l_whence = 0;
575          fls.l_type = F_WRLCK;
576 + #if 0
577          if (fcntl(outfd, F_SETLKW, &fls) < 0)
578                  filerr("lock");
579 + #else
580 +        dolock(outfd, F_WRLCK);
581   #endif
582 + #endif
583                                  /* write new piece to file */
584          if (lseek(outfd, (off_t)fls.l_start, SEEK_SET) < 0)
585                  filerr("seek");
# Line 595 | Line 599 | int    ypos
599                  }
600   #if NFS
601          fls.l_type = F_UNLCK;           /* release lock */
602 + #if 0
603          if (fcntl(outfd, F_SETLKW, &fls) < 0)
604                  filerr("lock");
605 + #else
606 +        dolock(outfd, F_UNLCK);
607 + #endif
608   #endif
609          if (verbose) {                          /* notify caller */
610                  printf("%d %d done\n", xpos, ypos);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines