12 |
|
#include <string.h> |
13 |
|
#include <signal.h> |
14 |
|
#include <sys/stat.h> |
15 |
+ |
#include <sys/types.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" |
126 |
|
char buf[512]; |
127 |
|
register int n; |
128 |
|
/* close input and output descriptors */ |
129 |
< |
close(fileno(stdin)); |
130 |
< |
close(fileno(stdout)); |
129 |
> |
close(0); |
130 |
> |
close(1); |
131 |
|
if (errfile == NULL) |
132 |
< |
close(fileno(stderr)); |
132 |
> |
close(2); |
133 |
|
/* create named pipes for input and output */ |
134 |
|
if (mkfifo(mktemp(strcpy(inpname,TEMPLATE)), 0600) < 0) |
135 |
|
goto createrr; |