Make zctx_destroy restore original sighandler #107

merged 1 commit into from Jan 3, 2013


None yet

2 participants


No description provided.

The problem with this change is that it breaks the case where an application does multiple zctx_new() and zctx_destroy() calls.

Also, the management of interrupts should perhaps go into a zsys now, it's not portable and messier than I'd like in zctx.

The problem is to allow CZMQ's interrupt handling to co-exist with external interrupt handling.

I'd suggest two new API calls,

  • zsys_handler_set - sets interrupt handler, NULL means application provides one already
  • zsys_handler_reset - resets interrupt handler that was saved in zctx_new(), if it wasn't null

Note that zctx_new() then needs a first time flag to call zsys_handler_set() only once.


I've missed that case.. Move this to zsys looks good! I'll fix that soon!

@hintjens hintjens merged commit 8a7301f into zeromq:master Jan 3, 2013
hintjens commented Jan 3, 2013

I'm merging this and will refactor it via zsys like I suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment