libev signal mask and thread

Marc Lehmann schmorp at
Sat Apr 28 14:13:59 CEST 2012

On Fri, Apr 27, 2012 at 07:14:35PM +0400, Konstantin Osipov <kostja.osipov at> wrote:
> How exactly does libev work with the process signal mask?

Exactly as documented - if you care for undocumented details, you could
look at the source, but these details *could* change.

> Is any manipulation with the thread signal mask in created threads
> necessary to ensure that signals actually arrive to the thread
> which is running the libev loop with appropriate watchers?

No, signals in posix are per-process, so you don't have to do
anything. Look at EVFGLAG_NOSIGMASK though, because libev might call
sigprocmask on it's own, which is not allowed in a threaded program (but
works on many platforms).

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list