This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stdout in gdb



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? 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]