Commit 89f64630 authored by Shawn Routhier's avatar Shawn Routhier
Browse files

[trac4002] Save a copy of the err string in case errno changes under us

parent d24119e8
......@@ -178,9 +178,10 @@ SignalSet::add(const int sig) {
sa.sa_handler = internalHandler;
sigfillset(&sa.sa_mask);
if (sigaction(sig, &sa, 0) < 0) {
const char* errmsg = strerror(errno);
erase(sig);
isc_throw(SignalSetError, "failed to register a signal handler for"
" signal " << sig << ": " << strerror(errno));
" signal " << sig << ": " << errmsg);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment