Re: [Libevent-users] Possible to use libevent to handle SIGTERM and SIGQUIT

2011-08-30 Thread Kun Xi
Yes, I just found out that I need to call event_add before start the message pump. Thanks. Kun On Tue, Aug 30, 2011 at 10:50 AM, Nick Mathewson wrote: > On Tue, Aug 30, 2011 at 1:46 PM, Kun Xi wrote: >> Hello, >> >> I just wondered whether libevent event loop can handle the SIGTERM and >> SIGQU

Re: [Libevent-users] Possible to use libevent to handle SIGTERM and SIGQUIT

2011-08-30 Thread Nick Mathewson
On Tue, Aug 30, 2011 at 1:46 PM, Kun Xi wrote: > Hello, > > I just wondered whether libevent event loop can handle the SIGTERM and > SIGQUIT appropriately.  Here is the code snippet I am trying to exit > the message loop gracefully and brutally: > > static void quick_shutdown(evutil_socket_t _, sh

[Libevent-users] Possible to use libevent to handle SIGTERM and SIGQUIT

2011-08-30 Thread Kun Xi
Hello, I just wondered whether libevent event loop can handle the SIGTERM and SIGQUIT appropriately. Here is the code snippet I am trying to exit the message loop gracefully and brutally: static void quick_shutdown(evutil_socket_t _, short what, void* ctx) { struct event_base *evb = (struct