From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10187 invoked by alias); 17 Jun 2009 19:39:49 -0000 Received: (qmail 10179 invoked by uid 22791); 17 Jun 2009 19:39:49 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 19:39:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EC9D42BAB3D; Wed, 17 Jun 2009 15:39:41 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3LfsUoO2xqtx; Wed, 17 Jun 2009 15:39:41 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B4A0C2BAB11; Wed, 17 Jun 2009 15:39:41 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7EA10F596C; Wed, 17 Jun 2009 12:39:38 -0700 (PDT) Date: Wed, 17 Jun 2009 19:39:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: muller@ics.u-strasbg.fr, gdb-patches@sourceware.org Subject: Re: [RFC] Improve testsuite for poor expect behavior Message-ID: <20090617193938.GB14549@adacore.com> References: <20090613150505.GA28157@caradoc.them.org> <000001c9ec65$9bf13ca0$d3d3b5e0$@u-strasbg.fr> <20090613235454.GA1893@caradoc.them.org> <20090614002516.GO25703@adacore.com> <000001c9ed8a$21cfdc30$656f9490$@u-strasbg.fr> <20090616145756.GB7730@adacore.com> <000c01c9eeda$022d8a70$06889f50$@u-strasbg.fr> <20090617133626.GA24310@caradoc.them.org> <20090617145429.GB7582@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00447.txt.bz2 > > > +#ifdef _WIN32 > > > + /* A Cygwin ssh session may not look like a terminal to the Windows > > > + runtime; ensure unbuffered output. */ > > > + setvbuf (stdout, NULL, _IONBF, BUFSIZ); > > > + setvbuf (stderr, NULL, _IONBF, BUFSIZ); > > > +#endif > > > > We have the exact same piece of code in our tree as well. We chose > > to put it in event-top, but it doesn't really matter. I'd really > > like to see at least this part being committed. > > Did someone check that switching it to binary will not interfere with > Emacs 23 GDB interface on Windows? Not sure about your specific question, but the piece I quoted only unbuffers stdout and stderr, so that output sent on both file handles do not get printed out of order (in other words, if we print on stderr first, and then stdout, we want the output to be in that order - with buffering, we observed that stderr output was printed after stdout output, even if the actual call to printf was in a different order). -- Joel