| 25 |
|
#include "ray.h" |
| 26 |
|
|
| 27 |
|
#ifdef F_SETLKW |
| 28 |
– |
#include "paths.h" |
| 28 |
|
#include "selcall.h" |
| 29 |
|
|
| 30 |
|
#ifndef TIMELIM |
| 43 |
|
static rsighandler_t sig_alrm; |
| 44 |
|
|
| 45 |
|
|
| 46 |
< |
extern void |
| 46 |
> |
void |
| 47 |
|
pfdetach(void) /* release persist (and header) resources */ |
| 48 |
|
{ |
| 49 |
|
if (persistfd >= 0) |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
|
| 60 |
< |
extern void |
| 60 |
> |
void |
| 61 |
|
pfclean(void) /* clean up persist files */ |
| 62 |
|
{ |
| 63 |
|
if (persistfd >= 0) |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
|
| 76 |
< |
extern void |
| 76 |
> |
void |
| 77 |
|
pflock( /* place or release exclusive lock on file */ |
| 78 |
|
int lf |
| 79 |
|
) |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
|
| 92 |
< |
extern void |
| 92 |
> |
void |
| 93 |
|
persistfile( /* open persist file and lock it */ |
| 94 |
|
char *pfn |
| 95 |
|
) |
| 118 |
|
static void sig_alrm(int i) { quit(0); } |
| 119 |
|
|
| 120 |
|
|
| 121 |
< |
extern void |
| 121 |
> |
void |
| 122 |
|
pfhold(void) /* holding pattern for idle rendering process */ |
| 123 |
|
{ |
| 124 |
|
rsighandler_t *oldalrm; |
| 125 |
|
char buf[512]; |
| 126 |
< |
register int n; |
| 126 |
> |
int n; |
| 127 |
|
/* close input and output descriptors */ |
| 128 |
|
close(0); |
| 129 |
|
close(1); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
|
| 184 |
< |
extern void |
| 184 |
> |
void |
| 185 |
|
io_process(void) /* just act as go-between for actual process */ |
| 186 |
|
{ |
| 187 |
< |
register char *cp; |
| 188 |
< |
register int nr, n; |
| 187 |
> |
char *cp; |
| 188 |
> |
int nr, n; |
| 189 |
|
char buf[BUFSIZ], *pfin, *pfout, *pferr; |
| 190 |
|
int pid, nfds; |
| 191 |
|
int fdout, fderr = -1; |
| 202 |
|
} |
| 203 |
|
if (nr < 0) |
| 204 |
|
error(SYSTEM, "error reading persist file"); |
| 206 |
– |
#ifndef _WIN32 /* XXX we need a replacement for that one */ |
| 205 |
|
ftruncate(persistfd, (off_t)0L); /* truncate persist file */ |
| 208 |
– |
#endif |
| 206 |
|
pfdetach(); /* close & release persist file */ |
| 207 |
|
buf[nr] = '\0'; /* parse what we got */ |
| 208 |
|
if ((cp = strchr(buf, ' ')) == NULL) |
| 294 |
|
if (!strncmp(cp, progname, n) && |
| 295 |
|
cp[n++] == ':' && |
| 296 |
|
cp[n++] == ' ') { |
| 297 |
< |
register struct erract *ep; |
| 297 |
> |
struct erract *ep; |
| 298 |
|
for (ep = erract; ep < erract+NERRS; |
| 299 |
|
ep++) |
| 300 |
|
if (ep->pre[0] && |
| 342 |
|
|
| 343 |
|
#else |
| 344 |
|
|
| 345 |
< |
extern void pfclean(void) {} |
| 345 |
> |
void pfclean(void) {} |
| 346 |
|
|
| 347 |
|
#endif |