I'm wondering if czmq's installation of signal handers as a side effect of creating a context with zctx_new is ideal.
If you run a reactor (zloop) in the main thread, I can see where the signal handling is helpful, but consider the case where you run zloops in attached threads. If the process gets a SIGTERM or SIGINT, the attached threads shutdown cleanly, but the main thread ends up in an unexpected state. You can have the main thread regain control of signal handling, of course, by using sigaction after each zctx_new, but in that case, you are fighting the czmq library. It might be better to add a separate (optional) method for installing signal processing within czmq, rather than forcing the behavior as a side effect. Anyone have any thoughts on this? Phil
signature.asc
Description: Digital signature
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
