From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8264 invoked by alias); 15 May 2006 13:39:30 -0000 Received: (qmail 8256 invoked by uid 22791); 15 May 2006 13:39:29 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao01.cox.net (HELO eastrmmtao01.cox.net) (68.230.240.38) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 13:39:26 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao01.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060515133924.YWAG17255.eastrmmtao01.cox.net@localhost.localdomain>; Mon, 15 May 2006 09:39:24 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1FfdIw-0003BT-Gr; Mon, 15 May 2006 09:40:10 -0400 Date: Mon, 15 May 2006 14:58:00 -0000 From: Bob Rossi To: Jim Blandy Cc: gdb@sourceware.org, Nick Roberts Subject: Re: invoking GDB from FE and signals Message-ID: <20060515134010.GG13445@brasko.net> References: <20060513141920.GC10678@brasko.net> <20060513145421.GA3664@nevyn.them.org> <20060513151026.GD10678@brasko.net> <20060513151057.GA4112@nevyn.them.org> <20060513152021.GE10678@brasko.net> <20060513154816.GA5022@nevyn.them.org> <20060513171441.GA13445@brasko.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00205.txt.bz2 On Sun, May 14, 2006 at 11:55:10PM -0700, Jim Blandy wrote: > > Bob Rossi writes: > > Would you mind posting how Emacs starts up GDB both in annotate mode and > > in mi mode? Does it use a pty or pipe? > > > > Also, what does it do when ^c is read? Does it 'write' the byte to GDB's > > stdin? or does it use 'kill(gdb_pid, SIGINT)'? > > The Emacs Lisp 'start-process' function, which is what the GDB mode > and other shell modes use, creates a pseudo-tty by default (when > available). You can dynamically bind process-connection-type while > calling it to get pipes if you want. Hey Jim, thanks for the info! The user that's having the problem with my FE states that emacs works fine. So, are you suggesting I could have him put some configuration line with regards to 'process-connection-type' to get emacs to use a pipe instead of a pty? If so, it would be perfect to see emacs also produce the same bug that my FE is producing. Do you know the exact line that he could add to a particular file in order to get emacs working like this? > When the process is communicating with Emacs via a pipe, Emacs sends > signals to it with 'kill'. When the process is using a pseudo-tty, > Emacs uses an ioctl on the master side to get the effect of the user > hitting C-c, but in a way that works even if the program has changed > the tty settings. I think at one point Emacs actually fetched the > 'intr' character from the tty's settings, and stuffed that character > into the master side, letting the tty driver generate the signal. But > you want to get the tty device involved somehow, so that the signal > will go to the tty's current process group. > > > (That was all so long ago...) Wow, this information is amazingly helpful. I do the same solution emacs is doing with regards to pipe's. I used to actually do the pty solution. I'm considering adding an option also, to allow using both solutions. Thanks, Bob Rossi