On Centos 4.3 as invoked by xend it seems that SIGUSR1 can be blocked.
This is almost certainly a libc bug; I checked by using sigprocmask to
obtain what was allegedly the current signal mask and printing it out
and SIGUSR1 wasn't listed, although my strace showed rt_sigprocmask
calls which clearly implied it was blocked - and indeed it wasn't
delivered.
Explicitly enabling it is an easy workaround.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
static int posix_aio_init(void)
{
struct sigaction act;
+ sigset_t enable;
PosixAioState *s;
int fds[2];
if (s == NULL)
return -ENOMEM;
+ /* under some circumstances on Centos 4.3 (at least)
+ * SIGUSR2 is mistakenly blocked, which breaks badly */
+ sigemptyset(&enable);
+ sigaddset(&enable,SIGUSR1);
+ sigprocmask(SIG_UNBLOCK,&enable,0);
+
sigfillset(&act.sa_mask);
act.sa_flags = 0; /* do not restart syscalls to interrupt select() */
act.sa_handler = aio_signal_handler;