[zeromq-dev] gist: using signalfd with zloop - synchronous signal delivery
Michael Haberler
mail17 at mah.priv.at
Tue Jan 14 22:32:34 CET 2014
since it's a bit tricky (or rather I didnt get it right first time..):
here is an example for using signalfd(2) for synchronous signal delivery in a zloop reactor
the key steps are:
- disable czmq signal handling by zsys_handler_set() once the context is created; this will also disable setting of zctx_interrupted
- block all signals from being handled via traditional handlers
- explicitly enable signals you want delivered via signalfd()
https://gist.github.com/mhaberler/8426050
- Michael
More information about the zeromq-dev
mailing list