Re: [zeromq-dev] czmq_new() and automatically installed signal handlers

2013-01-03 Thread Andy Ballingall TF
You're going to run into trouble if you want to exit any 0MQ loop, if your application is catching the signals, unless you emulate something like zctx_interrupted. In this scenario, I was envisaging that the application would be obliged to state whether it handled the signals in question,

Re: [zeromq-dev] czmq_new() and automatically installed signal handlers

2013-01-03 Thread Felipe Cruz
I just made a PR to restore original sighandlers in zctx_destroy (and tests) 2013/1/3 Andy Ballingall TF balling...@thefoundry.co.uk You're going to run into trouble if you want to exit any 0MQ loop, if your application is catching the signals, unless you emulate something like

Re: [zeromq-dev] czmq_new() and automatically installed signal handlers

2013-01-03 Thread Pieter Hintjens
Added some comments to that commit. I think this heads in the right direction but needs some thought to be clean and not break the API. On Thu, Jan 3, 2013 at 5:15 PM, Felipe Cruz felipec...@loogica.net wrote: I just made a PR to restore original sighandlers in zctx_destroy (and tests)

Re: [zeromq-dev] czmq_new() and automatically installed signal handlers

2013-01-02 Thread Pieter Hintjens
Good question... You're going to run into trouble if you want to exit any 0MQ loop, if your application is catching the signals, unless you emulate something like zctx_interrupted. Assuming you have an answer for that, I'd suggest a simple change; if zctx_interrupted is non-zero, don't install a

[zeromq-dev] czmq_new() and automatically installed signal handlers

2012-12-31 Thread Andy Ballingall TF
If you call zctx_new(), then it automatically adds a signal handler which captures SIGINT and SIGTERM. (At least for *nix) I'm using czmq to add new functionality to existing applications, some of which already have signal handling in place, so that's going to be an issue. Has anyone discussed