about summary refs log tree commit diff
path: root/Src/signals.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-23 15:13:27 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-23 15:13:27 +0000
commit2b37049c221501c6ae77e0308634aebcdb10060d (patch)
tree29c3604e4a9b5e9da1ff2c2d80be81f8d06f44a3 /Src/signals.c
parent4d60fd3feabfb7d24bf379d2f54ca5326211c494 (diff)
downloadzsh-2b37049c221501c6ae77e0308634aebcdb10060d.tar.gz
zsh-2b37049c221501c6ae77e0308634aebcdb10060d.tar.xz
zsh-2b37049c221501c6ae77e0308634aebcdb10060d.zip
manual/9838
Diffstat (limited to 'Src/signals.c')
-rw-r--r--Src/signals.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/Src/signals.c b/Src/signals.c
index c4bbad952..05ac465fb 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -177,20 +177,25 @@ signal_mask(int sig)
 
 /* Block the signals in the given signal *
  * set. Return the old signal set.       */
- 
+
+/**/
+#ifdef POSIX_SIGNALS
+
+/**/
+mod_export sigset_t dummy_sigset1, dummy_sigset2;
+
+/**/
+#else
+
 /**/
+#ifndef BSD_SIGNALS
+
 sigset_t
 signal_block(sigset_t set)
 {
     sigset_t oset;
  
-#ifdef POSIX_SIGNALS
-    sigprocmask(SIG_BLOCK, &set, &oset);
-#else
-# ifdef BSD_SIGNALS
-    oset = sigblock(set);
-# else
-#  ifdef SYSV_SIGNALS
+#ifdef SYSV_SIGNALS
     int i;
  
     oset = blocked_set;
@@ -200,7 +205,7 @@ signal_block(sigset_t set)
             sighold(i);
         }
     }
-#  else  /* NO_SIGNAL_BLOCKING */
+#else  /* NO_SIGNAL_BLOCKING */
 /* We will just ignore signals if the system doesn't have *
  * the ability to block them.                             */
     int i;
@@ -212,25 +217,27 @@ signal_block(sigset_t set)
             signal_ignore(i);
         }
    }
-#  endif /* SYSV_SIGNALS  */
-# endif  /* BSD_SIGNALS   */
-#endif   /* POSIX_SIGNALS */
+#endif /* SYSV_SIGNALS  */
  
     return oset;
 }
 
+/**/
+#endif /* BSD_SIGNALS */
+
+/**/
+#endif /* POSIX_SIGNALS */
+
 /* Unblock the signals in the given signal *
  * set. Return the old signal set.         */
 
-/**/
+#ifndef POSIX_SIGNALS
+
 sigset_t
 signal_unblock(sigset_t set)
 {
     sigset_t oset;
  
-#ifdef POSIX_SIGNALS
-    sigprocmask(SIG_UNBLOCK, &set, &oset);
-#else
 # ifdef BSD_SIGNALS
     sigfillset(&oset);
     oset = sigsetmask(oset);
@@ -260,11 +267,12 @@ signal_unblock(sigset_t set)
    }
 #  endif /* SYSV_SIGNALS  */
 # endif  /* BSD_SIGNALS   */
-#endif   /* POSIX_SIGNALS */
  
     return oset;
 }
 
+#endif   /* POSIX_SIGNALS */
+
 /* set the process signal mask to *
  * be the given signal mask       */