tdesjardins@lion.waterloo.edu (Tim Desjardins) (10/05/90)
The Aztec fexec function call leads me to believe that the stdout streams
are the same for the calling and the called processes . When I run the attached
program only the output from the calling process is written to the "test_file",
where the called programs output is echoed to the console. Have I read the
manual incorrectly, or am I doing something wrong or is MANX screwed up.
Here are the test programs, thanks in advance for any help.
test.c
#include <stdio.h>
/* test.c fexecs test2.c, all the output should be written to the file
test_file, but what really happens is that test.c's output is written
to the test_file and test2.c's output is written to the console.
*/
main()
{
FILE *fpo;
fpo = freopen( "test_file", "a", stdout );
printf( "begin\n\n" );
fexecl( "test2", "test2", ( char * ) NULL );
printf( "\nend\n" );
fclose( fpo ;)
}
test2.c
#include <stdio.h>
main()
{
printf( "this is a test\n" );
}
--
Tim Desjardins. tdesjardins@lion.waterloo.{edu|CA}
"It's better to regret something you have done, then to regret something
you haven't done." Butthole Surfers