From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: gdbui hang Date: Tue, 11 May 2004 22:07:31 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16545.16531.713274.678978@nick.uklinux.net> References: <16543.48815.692499.486290@nick.uklinux.net> <87fza8qewy.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084313256 22772 80.91.224.253 (11 May 2004 22:07:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 22:07:36 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 12 00:07:30 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNfPO-0005dy-00 for ; Wed, 12 May 2004 00:07:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNfPO-0006bv-00 for ; Wed, 12 May 2004 00:07:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNfMC-0003sQ-Uc for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 18:04:13 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNfLo-0003rM-SW for emacs-devel@gnu.org; Tue, 11 May 2004 18:03:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNfLI-0003kj-2H for emacs-devel@gnu.org; Tue, 11 May 2004 18:03:47 -0400 Original-Received: from [194.247.50.81] (helo=nick.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNfLH-0003kF-5P; Tue, 11 May 2004 18:03:15 -0400 Original-Received: by nick.uklinux.net (Postfix, from userid 501) id 40FBC75FDE; Tue, 11 May 2004 22:07:32 +0100 (BST) Original-To: Stefan Monnier In-Reply-To: <87fza8qewy.fsf-monnier+emacs@gnu.org> X-Mailer: VM 6.97 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23184 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23184 > Add a kill-buffer-hook in the GUD buffer to kill the process (and the > related buffers). Also add a check at the place where you select a buffer > that might be dead and if it's indeed dead clean things up as best you can. Changing gud-kill-buffer-hook like this seems to work (gud-sentinel cleans things up): (defun gud-kill-buffer-hook () (when (eq (current-buffer) gud-comint-buffer) (setq gud-minor-mode-type gud-minor-mode) (kill-process (get-buffer-process gud-comint-buffer)))) kill-process sends SIGKILL but I don't know why this kills the inferior (child process of gdb) because SIGKILL doesn't do this if I run gdb from an xterm. Shall I commit this change? Nick