diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-06-07 16:31:04 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-06-07 16:31:04 -0500 |
commit | d2aa556d1dea54fbfdfccbd64c2c477a79461a56 (patch) | |
tree | be0b5911a06356c4ff970e60b4b7f197147d432c /ext | |
parent | a39e16d8bc9f808ff9ca49c750eca77344a0cf60 (diff) | |
download | perl-d2aa556d1dea54fbfdfccbd64c2c477a79461a56.tar.gz |
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.
Diffstat (limited to 'ext')
-rwxr-xr-x | ext/threads/threads.xs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 95746539a6..54b00ac17d 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 */ |