This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
stdout in gdb
- To: <cygwin at cygwin dot com>
- Subject: stdout in gdb
- From: "Topas" <yrwang at cc dot nctu dot edu dot tw>
- Date: Tue, 22 May 2001 15:01:14 +0800
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?