12 |
|
#include <string.h> |
13 |
|
#include <signal.h> |
14 |
|
#include <sys/stat.h> |
15 |
+ |
#include <sys/types.h> |
16 |
+ |
#include <sys/wait.h> |
17 |
|
|
18 |
|
#include "platform.h" |
19 |
|
#include "rtprocess.h" /* getpid() */ |
123 |
|
char buf[512]; |
124 |
|
register int n; |
125 |
|
/* close input and output descriptors */ |
126 |
< |
close(fileno(stdin)); |
127 |
< |
close(fileno(stdout)); |
126 |
> |
close(0); |
127 |
> |
close(1); |
128 |
|
if (errfile == NULL) |
129 |
< |
close(fileno(stderr)); |
129 |
> |
close(2); |
130 |
|
/* create named pipes for input and output */ |
131 |
|
if (mkfifo(mktemp(strcpy(inpname,TEMPLATE)), 0600) < 0) |
132 |
|
goto createrr; |