From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6370 invoked by alias); 16 Sep 2003 19:22:35 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6362 invoked from network); 16 Sep 2003 19:22:34 -0000 Received: from unknown (HELO esds.vss.fsi.com) (66.136.174.212) by sources.redhat.com with SMTP; 16 Sep 2003 19:22:34 -0000 Received: from eos.vss.fsi.com (eos [198.51.27.61]) by esds.vss.fsi.com (8.11.6+Sun/8.9.1) with ESMTP id h8GJMXs22208 for ; Tue, 16 Sep 2003 14:22:33 -0500 (CDT) Received: from localhost (ford@localhost) by eos.vss.fsi.com (8.11.6+Sun/8.11.6) with ESMTP id h8GJMXh15185 for ; Tue, 16 Sep 2003 14:22:33 -0500 (CDT) X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs Date: Tue, 16 Sep 2003 19:34:00 -0000 From: Brian Ford X-X-Sender: ford@eos To: cygwin@cygwin.com Subject: Re: isatty bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-09/txt/msg01070.txt.bz2 Was that stock Cygwin gdb that crashed? Try this: $ cat stest.c #include #include int same_tty_p (int fd1, int fd2) { struct stat stat1, stat2; return (fstat(fd1, &stat1) >= 0 && fstat(fd2, &stat2) >= 0 && stat1.st_dev == stat2.st_dev && stat2.st_ino == stat2.st_ino); } int main(void) { printf("0/1: %d\n1/2: %d\n2/0: %d\n",same_tty_p(0,1), same_tty_p(1,2),same_tty_p(2,0)); printf("stat %d bytes\n", sizeof(struct stat)); } ford@fordpc ~ $ gcc -o stest stest.c ford@fordpc ~ $ ./stest 0/1: 1 1/2: 1 2/0: 1 stat 96 bytes $ nm stest.exe | grep fstat 00402970 T __fstat64 004060a4 I __imp___fstat64 004060e0 I __imp__fstat 004027a0 T _fstat Make sure struct stat is 96 bytes and you are calling fstat64. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/