Here is the question rephrased:
Will I get the exact same stream handle every time I fdopen file dscriptor 1?
For example, does the following *guranteed* to work?
#include <stdio.h> #include <string.h>
int main(void) {
printf("stdout: %lx\n", stdout);
fclose(stdout);
if((FILE *)fdopen(1,"w") != stdout) printf("1: %s\n", strerror);
return 0; }
It does work in the specific example, btw.
hm.. no it doesn't. Trying to print to stdout an error message after closing it is a silly idea :-)
OK, I'm convinced. This is a bug in the test suite. Buggers.
Gilad.
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
