Hi,

In the main thread of my project (which runs a UV loop) I use
uv_signal to handle USR1 signals.
Other threads also run their own UV loop but have not a uv_signal handler.

Typically in a multi-thread code one needs to block certain signals in
all the threads but the one in which it wants to receive it, and that
is done via:

  sigemptyset(&signal_mask);
  sigaddset(&signal_mask, SIGUSR1);
  pthread_sigmask(SIG_BLOCK, &signal_mask, nullptr);

My question is: do I need to run the above code in my threads (in all
but the main thread)? I ask this because it seems that libuv handle
signals globally regardless the number of UV loops running in the same
process. Is it needed then?

Thanks a lot.

PS: More documentation about how libuv internally handles signals
would be really useful.

-- 
Iñaki Baz Castillo
<[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to