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#9010: sigprocmask -> pthread_sigmask for Emacs Date: Fri, 08 Jul 2011 02:58:55 -0700 Organization: UCLA Computer Science Department Message-ID: <4E16D4DF.5060307@cs.ucla.edu> References: <4E14A53C.4060709@cs.ucla.edu> <83pqllnsv7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310123260 6869 80.91.229.12 (8 Jul 2011 11:07:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 11:07:40 +0000 (UTC) Cc: 9010@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 13:07:36 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf8uF-0002Ud-Tz for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 13:07:36 +0200 Original-Received: from localhost ([::1]:52390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf8uE-0000dS-C6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 07:07:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf7qx-0007pm-OT for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 06:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qf7qv-0006IE-MV for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 06:00:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf7qv-0006HD-AN for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2011 06:00:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qf7qt-0000yW-DY; Fri, 08 Jul 2011 06:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jul 2011 10:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9010 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9010-submit@debbugs.gnu.org id=B9010.13101191503654 (code B ref 9010); Fri, 08 Jul 2011 10:00:03 +0000 Original-Received: (at 9010) by debbugs.gnu.org; 8 Jul 2011 09:59:10 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf7q1-0000wt-3T for submit@debbugs.gnu.org; Fri, 08 Jul 2011 05:59:09 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf7px-0000wO-Q9 for 9010@debbugs.gnu.org; Fri, 08 Jul 2011 05:59:07 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 598C839E8128; Fri, 8 Jul 2011 02:59:00 -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 X2vIO8y4yZrS; Fri, 8 Jul 2011 02:58:59 -0700 (PDT) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BF41139E8116; Fri, 8 Jul 2011 02:58:59 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 In-Reply-To: <83pqllnsv7.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 08 Jul 2011 06:00:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:48241 Archived-At: On 07/08/11 00:17, Eli Zaretskii wrote: > After your patch, will there be any code in Emacs that still uses > sigprocmask? If not, we could just rename the w32.c sigprocmask stub > to pthread_sigmask. If sigprocmask will still be used, then your > suggestion for pthread_sigmask to call sigprocmask is TRT. There will still be some code in lib-src/emacsclient.c that uses sigprocmask, because emacsclient is single-threaded and does not need pthread_sigmask. pthread_sigmask sometimes needs extra libraries, such as -lpthread; these libraries are ordinarily linked into Emacs anyway, so it's no big deal for Emacs to call pthread_sigmask, but I'd rather not have single-threaded apps link to -lpthread if they don't need it. Does emacsclient run on w32 and/or msdos? If so, those libraries will need both pthread_sigmask and sigprocmask. If not, they can simply drop sigprocmask. I should mention that pthread_sigmask's API differs from that of sigprocmask in one minor way: if there is an error, sigprocmask sets errno whereas pthread_sigmask returns the error number. Emacs doesn't care about the difference, as it never looks at the error number, so the Windows libraries needn't worry about this detail.