--- ray/src/rt/persist.c 2003/06/30 14:59:12 2.29 +++ ray/src/rt/persist.c 2003/10/20 16:01:55 2.32 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: persist.c,v 2.29 2003/06/30 14:59:12 schorsch Exp $"; +static const char RCSid[] = "$Id: persist.c,v 2.32 2003/10/20 16:01:55 greg Exp $"; #endif /* * Routines for persistent rtrace and rpict processes. @@ -12,11 +12,10 @@ static const char RCSid[] = "$Id: persist.c,v 2.29 200 #include #include #include -#ifdef _WIN32 - #include /* getpid() */ -#endif +#include "rtprocess.h" /* getpid() */ #include "standard.h" +#include "platform.h" #include "random.h" #ifdef F_SETLKW @@ -27,10 +26,6 @@ static const char RCSid[] = "$Id: persist.c,v 2.29 200 #define TIMELIM (8*3600) /* time limit for holding pattern */ #endif -#ifndef freebsd -#define mkfifo(fn,md) mknod(fn, S_IFIFO|(md), 0) -#endif - extern void io_process(); extern int headismine; /* boolean true if header belongs to me */ @@ -90,6 +85,7 @@ int lf; } +void persistfile(pfn) /* open persist file and lock it */ char *pfn; { @@ -141,7 +137,7 @@ pfhold() /* holding pattern for idle rendering proces n = strlen(buf); if (write(persistfd, buf, n) < n) error(SYSTEM, "error writing persist file"); - lseek(persistfd, (off_t)0L, 0); + lseek(persistfd, (off_t)0, SEEK_SET); /* wait TIMELIM for someone to signal us */ got_io = 0; signal(SIGIO, sig_io);