From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8879 invoked by alias); 5 Dec 2007 18:37:37 -0000 Received: (qmail 8864 invoked by uid 22791); 5 Dec 2007 18:37:36 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Dec 2007 18:37:27 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-228-248-122.inter.net.il [84.228.248.122]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EHF49242 (AUTH halo1); Wed, 5 Dec 2007 20:37:13 +0200 (IST) Date: Wed, 05 Dec 2007 19:19:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org In-reply-to: <20071205101109.GA31968@calimero.vinschen.de> (message from Corinna Vinschen on Wed, 5 Dec 2007 11:11:09 +0100) Subject: Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin Reply-to: Eli Zaretskii References: <000101c83593$89c0fcd0$9d42f670$@u-strasbg.fr> <4755E78F.7000301@portugalmail.pt> <20071205101109.GA31968@calimero.vinschen.de> X-IsSubscribed: yes 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: 2007-12/txt/msg00086.txt.bz2 > Date: Wed, 5 Dec 2007 11:11:09 +0100 > From: Corinna Vinschen > > If you start a Cygwin process from another application using native > Windows functions (CreateProcess, etc), the whole fork/exec magic is > missing, apparently. One result is that the child process has to > figure out what the stdin/out/err streams are, using native Windows > functions. Since native Windows functions have no idea what a pseudo > tty is, the information returned is that stdio streams are connected > to pipes. So the child thinks its stdio streams are just pipes and > pipes are not ttys, apparently. I don't know if this is relevant (probably not), but please note that native Windows implementation of `isatty' does not faithfully emulates Posix functionality: it returns non-zero on _any_character_device_, not just on a terminal. For example, try redirecting to/from the null device. My grabbag of workarounds for Windows gotcha's includes this: #define ISATTY(fd) (isatty(fd) && lseek(fd,SEEK_CUR,0) == -1)