Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stdout and stderr redirection & the reverse action

Status
Not open for further replies.

kader121

Programmer
Jul 21, 2003
1
0
0
IE
How I can reverse the redirection of stdout & stderr ?
I used freopen() to redirect the stdout & stderr and all is OK.
But when i was to reverse these two action all are bad (I used for that the next code:
int ElementTest::reverseStd(FILE *top, FILE *fromp)
{
static char Name[] = "reversetStd";
FILE *newp;

newp = freopen("CON:", "w", fromp);
if( !newp )
{
printf("%s: error on reverse standart %s of file %s\n", Name );
return FAILED;
}
return SUCCESS;
}
Thank you in advance!
Kader
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top