From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23937 invoked by alias); 13 Aug 2010 08:30:04 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 23844 invoked by uid 22791); 13 Aug 2010 08:30:03 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Tom Tromey X-Fcc: ~/Mail/utrace Cc: Oleg Nesterov , archer@sourceware.org, utrace-devel@redhat.com Subject: Re: problems with v3 In-Reply-To: Tom Tromey's message of Thursday, 12 August 2010 22:37:18 -0600 References: <20100811235810.GA9783@redhat.com> <20100812011113.GA13212@redhat.com> <20100812023750.GA17011@redhat.com> <20100812235228.GA15051@redhat.com> <20100813015844.B7703400E3@magilla.sf.frob.com> Message-Id: <20100813082949.93D1E400E3@magilla.sf.frob.com> Date: Fri, 13 Aug 2010 08:30:00 -0000 X-SW-Source: 2010-q3/txt/msg00108.txt.bz2 > I don't know this area well, but considering that ser-unix.c is just > chock full of tty-related goo, I think it is probably important for > something. My impression is that this API is not just used for target > communication but also for manipulating gdb's own terminal. Ah, I see. > I've appended the patch I came up with. I have not tried it at all, but > it should all be pretty obvious. Yeah, that seems like it should be reasonable, i.e. more or less like what I'd figured it would do if it didn't have all these different backends. However, I think the test you probably want is !S_ISCHR. I believe that /proc/ugdb as is stats as S_ISREG, not S_ISFIFO. Actually, better yet, just make it !isatty (fd). Another pseudodevice that also behaves more like a socket than like a tty might be S_ISCHR, but only a tty isatty. Thanks, Roland