stdout in gdb

Topas yrwang@cc.nctu.edu.tw
Tue May 22 00:00:00 GMT 2001


Whenever I run a program under gdb, I find that the stdout is 
full-buffered.

So, I write a simple program to check the problem, 

int main()
{

printf("%s\n", ttyname(1));
printf("%d\n", isatty(1));
printf("%d\n", stdout->_flags & 0x0001);

return 0;
}

the output of the program is
/dev/tty0
1
1

but when I run the program under gdb, the output becomes
(null)
0
0

Is there any options/setting I miss in gdb? 



More information about the Cygwin mailing list