[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12697: Emacs crashes when using it as the commit editor for git
From: |
Paul Eggert |
Subject: |
bug#12697: Emacs crashes when using it as the commit editor for git |
Date: |
Sun, 28 Oct 2012 11:57:16 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 |
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
Description: Text document
bug#12697: Emacs crashes when using it as the commit editor for git, Paul Eggert, 2012/10/27
bug#12697: Emacs crashes when using it as the commit editor for git, Paul Eggert, 2012/10/31