121 |
|
char buf[512]; |
122 |
|
register int n; |
123 |
|
/* close input and output descriptors */ |
124 |
< |
close(fileno(stdin)); |
125 |
< |
close(fileno(stdout)); |
124 |
> |
close(0); |
125 |
> |
close(1); |
126 |
|
if (errfile == NULL) |
127 |
< |
close(fileno(stderr)); |
127 |
> |
close(2); |
128 |
|
/* create named pipes for input and output */ |
129 |
|
if (mkfifo(mktemp(strcpy(inpname,TEMPLATE)), 0600) < 0) |
130 |
|
goto createrr; |
335 |
|
} while ((nr -= n) > 0); |
336 |
|
} |
337 |
|
} |
338 |
< |
wait(0); /* wait for feeder process */ /* XXX platform */ |
338 |
> |
kill(pid, SIGTERM); /* no more process to feed, so... */ |
339 |
> |
waitpid(pid, 0, 0); /* wait for feeder process */ |
340 |
|
_exit(status); |
341 |
|
formerr: |
342 |
|
error(USER, "format error in persist file"); |