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: Fri, 26 Oct 2012 22:31:21 -0700 Organization: UCLA Computer Science Department Message-ID: <508B71A9.40509@cs.ucla.edu> References: <87vce38tqp.fsf@matt-laptop.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060303060202050504090500" X-Trace: ger.gmane.org 1351315923 27375 80.91.229.3 (27 Oct 2012 05:32:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2012 05:32:03 +0000 (UTC) Cc: Matthew Leach , Andreas Schwab To: 12697@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 07:32:07 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 1TRz07-0008NB-3E for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2012 07:32:03 +0200 Original-Received: from localhost ([::1]:47239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRyzy-0003ya-Iv for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2012 01:31:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRyzv-0003yV-JY for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 01:31:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRyzu-0002ep-7m for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 01:31:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRyzu-0002el-4a for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 01:31:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TRz22-0008Q3-O9 for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 01:34:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87vce38tqp.fsf@matt-laptop.i-did-not-set--mail-host-address--so-tickle-me> Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2012 05:34:02 +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: Original-Received: via spool by 12697-submit@debbugs.gnu.org id=B12697.135131602632340 (code B ref 12697); Sat, 27 Oct 2012 05:34:02 +0000 Original-Received: (at 12697) by debbugs.gnu.org; 27 Oct 2012 05:33:46 +0000 Original-Received: from localhost ([127.0.0.1]:35380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TRz1l-0008PY-A0 for submit@debbugs.gnu.org; Sat, 27 Oct 2012 01:33:46 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:50475) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TRz1h-0008PP-HZ for 12697@debbugs.gnu.org; Sat, 27 Oct 2012 01:33:43 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 01745A60031; Fri, 26 Oct 2012 22:31:28 -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 IhAVXA8p9n9a; Fri, 26 Oct 2012 22:31:26 -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 BBB58A6002C; Fri, 26 Oct 2012 22:31:26 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 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:66098 Archived-At: This is a multi-part message in MIME format. --------------060303060202050504090500 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I tried Andreas's suggestion of disabling ISIG, but this didn't work on Solaris, and it doesn't look like it'd work on any host where USABLE_SIGIO is false. Instead, how about the attached patch? It reenables the BSD_PGRPS idea, although reimplemented, as the old code can't easily be resurrected as-is. I haven't thought about how this affects the Windows port, so I'll CC: this to Eli. --------------060303060202050504090500 Content-Type: text/plain; charset=UTF-8; name="git-commit.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="git-commit.txt" PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9DaGFuZ2VMb2cnCi0tLSBzcmMvQ2hhbmdlTG9nCTIw MTItMTAtMjYgMDk6NDY6NDYgKzAwMDAKKysrIHNyYy9DaGFuZ2VMb2cJMjAxMi0xMC0yNyAw NToyMjo1NCArMDAwMApAQCAtMSwzICsxLDI0IEBACisyMDEyLTEwLTI3ICBQYXVsIEVnZ2Vy dCA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YWwgZm9yZWdyb3VuZCBncm91cC4gICovCitzdGF0aWMgdm9pZAord2lk ZW5fZm9yZWdyb3VuZF9ncm91cCAoaW50IGZkKQoreworICBpZiAoaW5oZXJpdGVkX3Bncm91 cCAmJiBzZXRwZ2lkICgwLCBpbmhlcml0ZWRfcGdyb3VwKSA9PSAwKQorICAgIHRjc2V0cGdy cF93aXRob3V0X3N0b3BwaW5nIChmZCwgaW5oZXJpdGVkX3Bncm91cCk7Cit9CisMCiAvKiBH ZXR0aW5nIGFuZCBzZXR0aW5nIGVtYWNzX3R0eSBzdHJ1Y3R1cmVzLiAgKi8KIAogLyogU2V0 ICpUQyB0byB0aGUgcGFyYW1ldGVycyBhc3NvY2lhdGVkIHdpdGggdGhlIHRlcm1pbmFsIEZE LgpAQCAtNzk5LDYgKzg2Myw4IEBACiAgIGlmICghdHR5X291dC0+b3V0cHV0KQogICAgIHJl dHVybjsgICAgICAgICAgICAgICAgICAgICAvKiBUaGUgdHR5IGlzIHN1c3BlbmRlZC4gKi8K IAorICBuYXJyb3dfZm9yZWdyb3VuZF9ncm91cCAoZmlsZW5vICh0dHlfb3V0LT5pbnB1dCkp OworCiAgIGlmICghIHR0eV9vdXQtPm9sZF90dHkpCiAgICAgdHR5X291dC0+b2xkX3R0eSA9 IHhtYWxsb2MgKHNpemVvZiAqdHR5X291dC0+b2xkX3R0eSk7CiAKQEAgLTEyMzEsNiArMTI5 Nyw3IEBACiAgIGRvc190dGNvb2tlZCAoKTsKICNlbmRpZgogCisgIHdpZGVuX2ZvcmVncm91 bmRfZ3JvdXAgKGZpbGVubyAodHR5X291dC0+aW5wdXQpKTsKIH0KIAwKICNpZmRlZiBIQVZF X1BUWVMKCg== --------------060303060202050504090500--