Article View: comp.sys.amiga.tech
Article #5628Need HELP with fexec and stdout [ REPOST ]
From: Tim Desjardins
Date: Fri, 05 Oct 1990 04:29
Date: Fri, 05 Oct 1990 04:29
38 lines
1614 bytes
1614 bytes
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
Technical Details
Message-ID:
<1990Oct5.042949.7258@watdragon.waterloo.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!watdragon!lion.waterloo.edu!tdesjardinsShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.amiga.tech Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!watdragon!lion.waterloo.edu!tdesjardins From: tdesjardins@lion.waterloo.edu (Tim Desjardins) Subject: Need HELP with fexec and stdout [ REPOST ] Message-ID: <1990Oct5.042949.7258@watdragon.waterloo.edu> Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes) Organization: University of Waterloo Date: Fri, 5 Oct 90 04:29:49 GMT Lines: 38