GNU bug report logs - #407
gpm server stop making emacs abort()

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Fri, 13 Jun 2008 21:05:05 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 407 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: 407 <at> debbugs.gnu.org
Subject: Re: bug#407: gpm server stop making emacs abort()
Date: Fri, 13 Jun 2008 18:18:32 -0400
> If running with
> 	(gpm-mouse-mode 1)
> and if you stop the gpm server, then emacs dies with
> 	Fatal error (6)Aborted
> Output from "bt full" below; xbacktrace printed nothing at all.

> The backtrace shows it at the abort() under the EBADF case in
> wait_reading_process_output().  I think when Gpm_GetEvent gets an eof
> from the server it closes gpm_fd; maybe that's the bad fd in question.

I can't test it right now.  Does the patch below help?


        Stefan


--- keyboard.c.~1.959.~	2008-06-03 02:14:30.000000000 -0400
+++ keyboard.c	2008-06-13 18:17:35.000000000 -0400
@@ -7189,6 +7189,8 @@
       while (gpm = Gpm_GetEvent (&event), gpm == 1) {
 	  nread += handle_one_term_event (tty, &event, &hold_quit);
       }
+      if (gpm < 0)
+	delete_gpm_wait_descriptor (gpm_fd);
       if (hold_quit.kind != NO_EVENT)
 	  kbd_buffer_store_event (&hold_quit);
       if (nread)




This bug report was last modified 15 years and 266 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.