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
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