}
}
+Capability *
+ioManagerStartCap (Capability *cap)
+{
+ return rts_evalIO(cap,&base_GHCziConc_ensureIOManagerIsRunning_closure,NULL);
+}
+
void
ioManagerStart (void)
{
Capability *cap;
if (io_manager_pipe < 0) {
cap = rts_lock();
- cap = rts_evalIO(cap,&base_GHCziConc_ensureIOManagerIsRunning_closure,NULL);
+ cap = ioManagerStartCap(cap);
rts_unlock(cap);
}
}
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)
{