Re: [Boost-users] Boost::ASIO, Signal handlers
Nothing, other than to log that the signal was received!
There appears to be an intermittent bug in my application, where I get the error " Transport endpoint not connected." which hints at sockets closing unexpectedly (I'm definitely not closing them accidentally!)
On Thu, Oct 15, 2009 at 11:43 AM, Dan Eaton
I was thinking to simply call std::signal() on my own, after the construction of io_service. Will that work, and is there a better way? I'm assuming that you're going to implement a handler for SIGPIPE, and out of curiosity, what will your handler will do?
Jon _______________________________________________ Boost-users mailing list Boost-us...http://groups.google.com/groups/unlock?_done=/group/boost-list/browse_thread/thread/f440622b29581796&msg=20e92d6810629512@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Thu, Oct 15, 2009 at 2:54 PM, Dan Eaton
Nothing, other than to log that the signal was received!
You should consider ignoring SIGPIPE, letting the IO operation fail, checking errno for EPIPE, and logging the event then (or doing whatever the asio equivalent to this is). This is way safer than trying to log something from a signal handler. Jon
participants (2)
-
Dan Eaton
-
Jonathan Franklin