Craig A. Berry [Sun, 7 Jun 2009 21:31:04 +0000 (16:31 -0500)]
According to the standard, use of sigprocmask is undefined in a
multi-threaded context, but in the absence of a per-thread signal
blocking mechanism (likely impossible until and unless per-thread
ASTs become available), this may be the best we can do.
This is a follow-up to:
b762d8667351cb765bc1d6419d30acff085da502.
#ifdef WIN32
/* XXX: How to do this on win32? */
return 0;
+#elif defined(VMS)
+ /* no per-thread blocking available */
+ return sigprocmask(SIG_BLOCK, &newmask, oldmask);
#else
return pthread_sigmask(SIG_BLOCK, &newmask, oldmask);
#endif /* WIN32 */
#ifdef WIN32
/* XXX: How to do this on win32? */
return 0;
+#elif defined(VMS)
+ return sigprocmask(SIG_SETMASK, newmask, NULL);
#else
return pthread_sigmask(SIG_SETMASK, newmask, NULL);
#endif /* WIN32 */