13 |
|
#include <signal.h> |
14 |
|
#include <sys/stat.h> |
15 |
|
#include <sys/types.h> |
16 |
– |
#include <sys/wait.h> |
16 |
|
|
17 |
|
#include "platform.h" |
18 |
+ |
#ifndef NON_POSIX /* XXX need abstraction for process management */ |
19 |
+ |
#include <sys/wait.h> |
20 |
+ |
#endif |
21 |
+ |
|
22 |
|
#include "rtprocess.h" /* getpid() */ |
23 |
|
#include "standard.h" |
24 |
|
#include "random.h" |
157 |
|
signal(SIGIO, SIG_DFL); |
158 |
|
pflock(1); /* grab persist file back */ |
159 |
|
/* someone wants us; reopen stdin and stdout */ |
157 |
– |
/* |
158 |
– |
if (freopen(inpname, "r", stdin) == NULL) |
159 |
– |
goto openerr; |
160 |
– |
if (freopen(outpname, "w", stdout) == NULL) |
161 |
– |
goto openerr; |
162 |
– |
*/ |
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"); |
185 |
– |
openerr: |
186 |
– |
error(SYSTEM, "cannot open named pipes in pfhold"); |
182 |
|
} |
183 |
|
|
184 |
|
|