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#12327: Signal-handler cleanup for Emacs Date: Mon, 03 Sep 2012 01:16:08 -0700 Organization: UCLA Computer Science Department Message-ID: <50446748.3060406@cs.ucla.edu> References: <50428E57.8070708@cs.ucla.edu> <83d324fh3c.fsf@gnu.org> <5043ACF7.7080100@cs.ucla.edu> <838vcsf7f9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010606010907020401040501" X-Trace: ger.gmane.org 1346660218 17839 80.91.229.3 (3 Sep 2012 08:16:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Sep 2012 08:16:58 +0000 (UTC) Cc: lekktu@gmail.com, 12327@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 03 10:16:58 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 1T8Rq5-0002n9-M3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2012 10:16:58 +0200 Original-Received: from localhost ([::1]:54152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Rq2-0000cC-VU for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2012 04:16:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Rpr-0000c4-0u for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 04:16:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8Rpf-0005N1-H0 for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 04:16:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Rpf-0005Mw-CS for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 04:16:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T8Rr8-0005J1-5s for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 04:18: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: Mon, 03 Sep 2012 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12327 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12327-submit@debbugs.gnu.org id=B12327.134666026920374 (code B ref 12327); Mon, 03 Sep 2012 08:18:02 +0000 Original-Received: (at 12327) by debbugs.gnu.org; 3 Sep 2012 08:17:49 +0000 Original-Received: from localhost ([127.0.0.1]:35555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8Rqs-0005IQ-1I for submit@debbugs.gnu.org; Mon, 03 Sep 2012 04:17:49 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52975) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8Rqk-0005ID-OH for 12327@debbugs.gnu.org; Mon, 03 Sep 2012 04:17:45 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 90301A6001E; Mon, 3 Sep 2012 01:16:06 -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 imkSC-Wx6fkC; Mon, 3 Sep 2012 01:16:03 -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 59039A6001A; Mon, 3 Sep 2012 01:16:03 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 In-Reply-To: <838vcsf7f9.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:63697 Archived-At: This is a multi-part message in MIME format. --------------010606010907020401040501 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 09/02/2012 02:20 PM, Eli Zaretskii wrote: > If that's the problem, then fix that, by changing the type. If I understand this suggestion correctly, it's not practical. GNU/Linux sigblock returns 'int', but its signal masks require 1024 bits, too wide for 'int'. This is why sigblock has been removed from POSIX and is documented as obsolete in GNU/Linux. > Changes come at a cost, which should be justified. My point was that the new version is smaller and faster. How much smaller and faster doesn't matter much, as the primary justification for the change is to reduce the confusion caused by the current setup. > I could go with replacing 'signal' etc. with their modern Posix > replacements OK, thanks, I reworked the patch to implement that suggestion. I also modified it a bit in other ways, to boost the performance a bit (as that suggestion caused a small performance hit). The result is attached. I expect the Windows port will need a few tweaks. --------------010606010907020401040501 Content-Type: text/plain; charset=UTF-8; name="syssignal.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="syssignal.txt" PT09IG1vZGlm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AgICAgICAgICAgICAgICAgICAgICAgICAgXAotICBkbyB7ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAg IGlmICghcHRocmVhZF9lcXVhbCAocHRocmVhZF9zZWxmICgpLCBtYWluX3RocmVhZCkpCQkJ XAotICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAvKiBQT1NJWCBzYXlzIGFueSB0aHJl YWQgY2FuIHJlY2VpdmUgdGhlIHNpZ25hbC4gIE9uIEdOVS9MaW51eCAgXAotICAgICAgICAg ICB0aGF0IGlzIG5vdCB0cnVlLCBidXQgZm9yIG90aGVyIHN5c3RlbXMgKEZyZWVCU0QgYXQg bGVhc3QpICAgXAotICAgICAgICAgICBpdCBpcy4gIFNvIGRpcmVjdCB0aGUgc2lnbmFsIHRv IHRoZSBjb3JyZWN0IHRocmVhZCBhbmQgYmxvY2sgXAotICAgICAgICAgICBpdCBmcm9tIHRo aXMgdGhyZWFkLiAgKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAot ICAgICAgICBzaWdzZXRfdCBuZXdfbWFzazsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBzaWdl bXB0eXNldCAoJm5ld19tYXNrKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgXAotICAgICAgICBzaWdhZGRzZXQgKCZuZXdfbWFzaywgc2lnbm8pOyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBwdGhyZWFkX3NpZ21hc2sg KFNJR19CTE9DSywgJm5ld19tYXNrLCAwKTsgICAgICAgICAgICAgICAgICAgICAgXAotICAg ICAgICBwdGhyZWFkX2tpbGwgKG1haW5fdGhyZWFkLCBzaWdubyk7ICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgXAotICAgICAgICByZXR1cm47ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgfSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXAotICAgfSB3aGlsZSAoMCkKK2V4dGVybiBib29sIGZvcndhcmRlZF9zaWduYWwgKGlu dCk7CisjZWxzZQorU1lTU0lHTkFMX0lOTElORSBib29sIGZvcndhcmRlZF9zaWduYWwgKGlu dCBzaWdubykgeyByZXR1cm4gMDsgfQorI2VuZGlmCiAKLSNlbHNlIC8qIG5vdCBGT1JXQVJE X1NJR05BTF9UT19NQUlOX1RIUkVBRCAqLwotI2RlZmluZSBTSUdOQUxfVEhSRUFEX0NIRUNL KHNpZ25vKQotI2VuZGlmIC8qIG5vdCBGT1JXQVJEX1NJR05BTF9UT19NQUlOX1RIUkVBRCAq LworSU5MSU5FX0hFQURFUl9FTkQKCj09PSBtb2RpZmllZCBmaWxlICdzcmMvdGVybS5jJwot LS0gc3JjL3Rlcm0uYwkyMDEyLTA4LTMxIDEwOjUzOjE5ICswMDAwCisrKyBzcmMvdGVybS5j CTIwMTItMDktMDMgMDY6NTA6MTkgKzAwMDAKQEAgLTI1LDcgKzI1LDYgQEAKICNpbmNsdWRl IDxzeXMvZmlsZS5oPgogI2luY2x1ZGUgPHN5cy90aW1lLmg+CiAjaW5jbHVkZSA8dW5pc3Rk Lmg+Ci0jaW5jbHVkZSA8c2lnbmFsLmg+CiAjaW5jbHVkZSA8c2V0am1wLmg+CiAKICNpbmNs dWRlICJsaXNwLmgiCkBAIC0yOTMyLDcgKzI5MzEsMTAgQEAKICAgICAgIG5vX2NvbnRyb2xs aW5nX3R0eSA9IDE7CiAjZWxzZQogI2lmZGV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