{
sigset_t sigs;
- xsigprocmask(SIG_SETMASK, NULL, &sigs);
+ xpthread_sigmask(SIG_SETMASK, NULL, &sigs);
return sigismember(&sigs, SIGCHLD);
}
sigemptyset(&sigchld);
sigaddset(&sigchld, SIGCHLD);
- xsigprocmask(SIG_BLOCK, &sigchld, oldsigs);
+ xpthread_sigmask(SIG_BLOCK, &sigchld, oldsigs);
}
static void
unblock_sigchld(const sigset_t *oldsigs)
{
- xsigprocmask(SIG_SETMASK, oldsigs, NULL);
+ xpthread_sigmask(SIG_SETMASK, oldsigs, NULL);
}
/*
- * Copyright (c) 2008, 2009, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2011, 2012, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
void
-xsigprocmask(int how, const sigset_t *new, sigset_t *old)
+xpthread_sigmask(int how, const sigset_t *new, sigset_t *old)
{
- if (sigprocmask(how, new, old)) {
- VLOG_FATAL("sigprocmask failed (%s)", strerror(errno));
+ int error = pthread_sigmask(how, new, old);
+ if (error) {
+ VLOG_FATAL("pthread_sigmask failed (%s)", strerror(error));
}
}
/*
- * Copyright (c) 2008, 2011 Nicira, Inc.
+ * Copyright (c) 2008, 2011, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const char *signal_name(int signum);
void xsigaction(int signum, const struct sigaction *, struct sigaction *old);
-void xsigprocmask(int how, const sigset_t *, sigset_t *old);
+void xpthread_sigmask(int how, const sigset_t *, sigset_t *old);
#endif /* signals.h */
sigset_t sigalrm;
sigemptyset(&sigalrm);
sigaddset(&sigalrm, SIGALRM);
- xsigprocmask(SIG_BLOCK, &sigalrm, oldsigs);
+ xpthread_sigmask(SIG_BLOCK, &sigalrm, oldsigs);
}
static void
unblock_sigalrm(const sigset_t *oldsigs)
{
- xsigprocmask(SIG_SETMASK, oldsigs, NULL);
+ xpthread_sigmask(SIG_SETMASK, oldsigs, NULL);
}
long long int