bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9010: sigprocmask -> pthread_sigmask for Emacs


From: Paul Eggert
Subject: bug#9010: sigprocmask -> pthread_sigmask for Emacs
Date: Fri, 08 Jul 2011 02:58:55 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]