From: Craig A. Berry Date: Sun, 7 Jun 2009 21:31:04 +0000 (-0500) Subject: There is no pthread_sigmask on VMS, so use sigprocmask instead. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2aa556d1dea54fbfdfccbd64c2c477a79461a56;p=p5sagit%2Fp5-mst-13.2.git There is no pthread_sigmask on VMS, so use sigprocmask instead. 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. --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 9574653..54b00ac 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -137,6 +137,9 @@ S_block_most_signals(sigset_t *oldmask) #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 */ @@ -149,6 +152,8 @@ S_set_sigmask(sigset_t *newmask) #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 */