GNU bug report logs - #12697
24.2; Emacs crashes when using it as the commit editor for git

Previous Next

Package: emacs;

Reported by: Matthew Leach <matthew <at> mattleach.net>

Date: Mon, 22 Oct 2012 01:57:02 UTC

Severity: important

Tags: patch

Found in version 24.2

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 12697 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: matthew <at> mattleach.net, 12697 <at> debbugs.gnu.org, schwab <at> linux-m68k.org
Subject: Re: Emacs crashes when using it as the commit editor for git
Date: Sun, 28 Oct 2012 11:57:16 -0700
[Message part 1 (text/plain, inline)]
On 10/27/2012 12:52 AM, Eli Zaretskii wrote:

> The termios-related stuff (the call to tcsetgrp) in sysdep.c should be
> #ifedf'ed away for Windows (for DOS_NT, actually).  Also, the
> references to SIGTTOU should be conditioned on that signal being
> defined.

Thanks, that problem occurs with older POSIXish systems too.
Here's a simple fix for it.  I'm attaching the resulting
combined patch, relative to trunk bzr 110706.

The bug is a relatively serious one, so I'm inclined to install
the combined patch soon.

=== modified file 'src/sysdep.c'
--- src/sysdep.c	2012-10-27 05:07:17 +0000
+++ src/sysdep.c	2012-10-28 18:39:51 +0000
@@ -716,16 +716,21 @@
 /* Safely set a controlling terminal FD's process group to PGID.
    If we are not in the foreground already, POSIX requires tcsetpgrp
    to deliver a SIGTTOU signal, which would stop us.  This is an
-   annoyance, so temporarily ignore the signal.  */
+   annoyance, so temporarily ignore the signal.
+
+   In practice, platforms lacking SIGTTOU also lack tcsetpgrp, so
+   skip all this unless SIGTTOU is defined.  */
 static void
 tcsetpgrp_without_stopping (int fd, pid_t pgid)
 {
+#ifdef SIGTTOU
   signal_handler_t handler;
   block_input ();
   handler = signal (SIGTTOU, SIG_IGN);
   tcsetpgrp (fd, pgid);
   signal (SIGTTOU, handler);
   unblock_input ();
+#endif
 }
 
 /* Split off the foreground process group to Emacs alone.  When we are


[git-commit.txt (text/plain, attachment)]

This bug report was last modified 12 years and 264 days ago.

Previous Next


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