Commit 7bba4a71 authored by Shawn Routhier's avatar Shawn Routhier
Browse files

Merge branch 'trac4002' Save error string before use

Save the error string before using it to minimize the possibility of
it changing between when it gets generated and reviewed and when it
gets logged.
parents a955dee5 89f64630
......@@ -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