Commit aa2e8180 authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix signal segfaults on Solaris (#3790)

parent cd2773d8
......@@ -183,7 +183,14 @@ generic_handler(int sig USED_IF_THREADS,
int r;
buf[0] = sig;
memcpy(buf+1, info, sizeof(siginfo_t));
if (info == NULL) {
// info may be NULL on Solaris (see #3790)
memset(buf+1, 0, sizeof(siginfo_t));
} else {
memcpy(buf+1, info, sizeof(siginfo_t));
}
r = write(io_manager_pipe, buf, sizeof(siginfo_t)+1);
if (r == -1 && errno == EAGAIN)
{
......
Supports Markdown
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