![]() |
|
|
+ Search |
![]()
|
Mar 3rd, 2000 20:32
Nathan Wallace, Niels Diepeveen
Something like this will probably work:
int stdoutfds[2];
if (_pipe(stdoutfds, 512, _O_BINARY))
....
if (_dup2(stdoutfds[1], 1) /* Redirect stdout */
....
if (_dup2(stdoutfds[1], 2) /* Redirect stderr */
....
_close(stdoutfds[1]);