From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#12697: Emacs crashes when using it as the commit editor for git Date: Sun, 28 Oct 2012 11:57:16 -0700 Organization: UCLA Computer Science Department Message-ID: <508D800C.7090707@cs.ucla.edu> References: <508B71A9.40509@cs.ucla.edu> <83wqyc8i8k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070102060109040902090905" X-Trace: ger.gmane.org 1351450670 13552 80.91.229.3 (28 Oct 2012 18:57:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 18:57:50 +0000 (UTC) Cc: matthew@mattleach.net, 12697@debbugs.gnu.org, schwab@linux-m68k.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 19:57:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TSY3X-0000JP-Ce for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 19:57:55 +0100 Original-Received: from localhost ([::1]:54306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSY3P-0001gK-C4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 14:57:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSY3K-0001ex-Qa for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 14:57:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSY3J-0006nv-2h for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 14:57:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSY3I-0006nr-VD for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 14:57:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSY5a-00054T-2L for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 15:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2012 19:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12697 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12697-submit@debbugs.gnu.org id=B12697.135145078419445 (code B ref 12697); Sun, 28 Oct 2012 19:00:01 +0000 Original-Received: (at 12697) by debbugs.gnu.org; 28 Oct 2012 18:59:44 +0000 Original-Received: from localhost ([127.0.0.1]:36900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSY5H-00053Z-3s for submit@debbugs.gnu.org; Sun, 28 Oct 2012 14:59:43 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:55696) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSY5D-00053R-O6 for 12697@debbugs.gnu.org; Sun, 28 Oct 2012 14:59:41 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id B644239E8105; Sun, 28 Oct 2012 11:57:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K31w7yRLOYJv; Sun, 28 Oct 2012 11:57:16 -0700 (PDT) Original-Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B11AA39E8100; Sun, 28 Oct 2012 11:57:16 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 In-Reply-To: <83wqyc8i8k.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66149 Archived-At: This is a multi-part message in MIME format. --------------070102060109040902090905 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 --------------070102060109040902090905 Content-Type: text/plain; charset=UTF-8; name="git-commit.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="git-commit.txt" PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9DaGFuZ2VMb2cnCi0tLSBzcmMvQ2hhbmdlTG9nCTIw MTItMTAtMjggMTc6NDI6NTIgKzAwMDAKKysrIHNyYy9DaGFuZ2VMb2cJMjAxMi0xMC0yOCAx ODozMzo0MSArMDAwMApAQCAtMSwzICsxLDI0IEBACisyMDEyLTEwLTI4ICBQYXVsIEVnZ2Vy dCAgPGVnZ2VydEBjcy51Y2xhLmVkdT4KKworCUZpeCBjcmFzaCB3aGVuIHVzaW5nIEVtYWNz IGFzIGNvbW1pdCBlZGl0b3IgZm9yIGdpdCAoQnVnIzEyNjk3KS4KKwkqIGNhbGxwcm9jLmMg KHNldHBncnApOiBSZW1vdmUgbWFjcm8sIGFzIHdlIG5vdyB1c2Ugc2V0cGdpZAorCWFuZCBp dCBpcyBjb25maWd1cmVkIGluIGNvbmZfcG9zdC5oLgorCShGY2FsbF9wcm9jZXNzKTogRG9u J3QgaW52b2tlIGJvdGggc2V0c2lkIGFuZCBzZXRwZ2lkOyB0aGUgZm9ybWVyCisJaXMgZW5v dWdoLCBpZiBpdCBleGlzdHMuCisJKiBjYWxscHJvYy5jIChGY2FsbF9wcm9jZXNzLCBjaGls ZF9zZXR1cCk6CisJKiBwcm9jZXNzLmMgKGNyZWF0ZV9wcm9jZXNzKTogVXNlIHNldHBnaWQu CisJKiBjb25mX3Bvc3QuaCAoc2V0cGdpZCkgWyFIQVZFX1NFVFBHSURdOiBOZXcgbWFjcm8s IHdoaWNoIHN1YnN0aXR1dGVzCis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gIGlmICghdHR5X291dC0+b3V0cHV0 KQogICAgIHJldHVybjsgICAgICAgICAgICAgICAgICAgICAvKiBUaGUgdHR5IGlzIHN1c3Bl bmRlZC4gKi8KIAorICBuYXJyb3dfZm9yZWdyb3VuZF9ncm91cCAoZmlsZW5vICh0dHlfb3V0 LT5pbnB1dCkpOworCiAgIGlmICghIHR0eV9vdXQtPm9sZF90dHkpCiAgICAgdHR5X291dC0+ b2xkX3R0eSA9IHhtYWxsb2MgKHNpemVvZiAqdHR5X291dC0+b2xkX3R0eSk7CiAKQEAgLTEy MzEsNiArMTMwMiw3IEBACiAgIGRvc190dGNvb2tlZCAoKTsKICNlbmRpZgogCisgIHdpZGVu X2ZvcmVncm91bmRfZ3JvdXAgKGZpbGVubyAodHR5X291dC0+aW5wdXQpKTsKIH0KIAwKICNp ZmRlZiBIQVZFX1BUWVMKCg== --------------070102060109040902090905--