blocking canceled in entrypoint constructor

Christian Helmuth christian.helmuth at ...1...
Fri Jan 12 16:32:49 CET 2018


Hello Johannes,

On Fri, Jan 12, 2018 at 01:09:25PM +0100, Johannes Kliemann wrote:
> Why does Genode handle -EINTR with an exception and not the way proposed
> in the GNU manual?

We use the Linux signal mechanism with signal SIGUSR1 to implement our
cancelable lock. So, if a thread is unblocked with the EINTR error it
reflects the cancellation by throwing this exception. Core's initial
thread is unblocked only once by this mechanism and then blocks in

  ./base/src/core/signal_receiver.cc:41:void Signal_receiver::block_for_signal()

Did you find out which signal occurred in core? We setup several
signal handlers for fatal signals (e.g., SIGSEGV) that log diagnostic
info and also

  src/core/thread_linux.cc:45    SIGUSR1
  ./src/core/platform.cc:95      SIGINT
  ./src/core/platform.cc:98      SIGCHLD

You could try to setup more handlers this way and log signal
occurrence.

Cheers
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list