Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Topas" To: Subject: stdout in gdb Date: Tue, 22 May 2001 15:01:14 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="big5" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id DAA15115 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?