From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22110 invoked by alias); 5 Dec 2007 22:56:27 -0000 Received: (qmail 22102 invoked by uid 22791); 5 Dec 2007 22:56:27 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Dec 2007 22:56:21 +0000 Received: by nf-out-0910.google.com with SMTP id b11so3382015nfh for ; Wed, 05 Dec 2007 14:56:20 -0800 (PST) Received: by 10.78.193.5 with SMTP id q5mr1435451huf.1196895379866; Wed, 05 Dec 2007 14:56:19 -0800 (PST) Received: from ?88.210.66.24? ( [88.210.66.24]) by mx.google.com with ESMTPS id 7sm33735nfv.2007.12.05.14.56.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Dec 2007 14:56:19 -0800 (PST) Message-ID: <47572C95.9030804@portugalmail.pt> Date: Wed, 05 Dec 2007 23:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin References: <000101c83593$89c0fcd0$9d42f670$@u-strasbg.fr> <4755E78F.7000301@portugalmail.pt> <20071205101109.GA31968@calimero.vinschen.de> In-Reply-To: <20071205101109.GA31968@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00097.txt.bz2 Corinna Vinschen wrote: > > Right. The problem occurs when running a session in a pseudo tty like > when starting GDB in a ssh session or when you set CYGWIN=tty before > starting the first Cygwin process (the shell, usually) in a Windows > console window. > > Pseudo ttys are implemented in Cygwin using pipes. When you start a > Cygwin application with fork/exec, the knowledge about this pipes (being > a pseudo tty) is inherited by the child process by means of the fork/ > exec magic. > > 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. > > Thank you very much for the explanation. Isn't there a shared memory section amongst all loaded copies of cygwin1.dll? Can't that be used to reconstruct the pseudo ttys from the pipes? -- Pedro Alves