39 |
|
static int persistfd = -1; /* persist file descriptor */ |
40 |
|
static char inpname[TEMPLEN+1], outpname[TEMPLEN+1], errname[TEMPLEN+1]; |
41 |
|
|
42 |
< |
typedef void (sighandler_t)(int); |
43 |
< |
static sighandler_t sig_io; |
44 |
< |
static sighandler_t sig_alrm; |
42 |
> |
typedef void (rsighandler_t)(int); |
43 |
> |
static rsighandler_t sig_io; |
44 |
> |
static rsighandler_t sig_alrm; |
45 |
|
|
46 |
|
|
47 |
|
extern void |
122 |
|
extern void |
123 |
|
pfhold(void) /* holding pattern for idle rendering process */ |
124 |
|
{ |
125 |
< |
sighandler_t *oldalrm; |
125 |
> |
rsighandler_t *oldalrm; |
126 |
|
char buf[512]; |
127 |
|
register int n; |
128 |
|
/* close input and output descriptors */ |
157 |
|
signal(SIGIO, SIG_DFL); |
158 |
|
pflock(1); /* grab persist file back */ |
159 |
|
/* someone wants us; reopen stdin and stdout */ |
160 |
– |
/* |
161 |
– |
if (freopen(inpname, "r", stdin) == NULL) |
162 |
– |
goto openerr; |
163 |
– |
if (freopen(outpname, "w", stdout) == NULL) |
164 |
– |
goto openerr; |
165 |
– |
*/ |
160 |
|
close(0); |
161 |
|
if (open(inpname, O_RDONLY) != 0) |
162 |
|
error(INTERNAL, "unexpected stdin file number"); |
179 |
|
return; |
180 |
|
createrr: |
181 |
|
error(SYSTEM, "cannot create named pipes in pfhold"); |
188 |
– |
openerr: |
189 |
– |
error(SYSTEM, "cannot open named pipes in pfhold"); |
182 |
|
} |
183 |
|
|
184 |
|
|