make a less pthreads specific way to mask signals
authorwohl <wohl@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 23 Jun 2003 17:11:30 +0000 (17:11 +0000)
committerwohl <wohl@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 23 Jun 2003 17:11:30 +0000 (17:11 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@543 cb58f699-b61c-0410-a6fe-9272a202ed29

shib/shib-threads-win32.cpp
shib/shib-threads.cpp
shib/shib-threads.h

index b8752f4..67aad16 100644 (file)
@@ -348,6 +348,10 @@ public:
 // public "static" creation functions
 //
 
+void Thread::mask_all_signals(void)
+{
+}
+
 Thread* Thread::create(void* (*start_routine)(void*), void* arg)
 {
   return new ThreadImpl(start_routine, arg);
index de95a8e..dcd05e6 100644 (file)
@@ -142,6 +142,13 @@ void Thread::exit(void* return_val)
   pthread_exit (return_val);
 }
     
+void Thread::mask_all_signals(void)
+{
+  sigset_t sigmask;
+  sigfillset(&sigmask);
+  Thread::mask_signals(SIG_BLOCK, &sigmask, NULL);
+}
+
 int Thread::mask_signals(int how, const sigset_t *newmask, sigset_t *oldmask)
 {
   return pthread_sigmask(how,newmask,oldmask);
index 015a66d..7338715 100644 (file)
@@ -24,6 +24,7 @@ namespace shibboleth {
   public:
     static Thread* create(void* (*start_routine)(void*), void* arg);
     static void exit(void* return_val);
+    static void mask_all_signals(void);
 #ifndef WIN32
     static int mask_signals(int how, const sigset_t *newmask, sigset_t *oldmask);
 #endif