aboutsummaryrefslogtreecommitdiffstats
path: root/common/signal.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-03-22 12:46:05 +0000
committerWerner Koch <[email protected]>2010-03-22 12:46:05 +0000
commite64038608be28c14ed72b0372529762953de898f (patch)
tree3847da576d4f2e6c542ce6737179a11afcc1a487 /common/signal.c
parentBuilds again for W32. (diff)
downloadgnupg-e64038608be28c14ed72b0372529762953de898f.tar.gz
gnupg-e64038608be28c14ed72b0372529762953de898f.zip
More chnages to use estream. Add a way to replace the standard
descriptors.
Diffstat (limited to 'common/signal.c')
-rw-r--r--common/signal.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/common/signal.c b/common/signal.c
index 2147dacab..422f6af3a 100644
--- a/common/signal.c
+++ b/common/signal.c
@@ -170,38 +170,13 @@ gnupg_init_signals (int mode, void (*fast_cleanup)(void))
#endif
}
-void
-gnupg_pause_on_sigusr (int which)
-{
-#ifndef HAVE_DOSISH_SYSTEM
-# ifdef HAVE_SIGPROCMASK
- sigset_t mask, oldmask;
-
- assert (which == 1);
- sigemptyset( &mask );
- sigaddset( &mask, SIGUSR1 );
-
- sigprocmask( SIG_BLOCK, &mask, &oldmask );
- while (!caught_sigusr1)
- sigsuspend (&oldmask);
- caught_sigusr1 = 0;
- sigprocmask (SIG_UNBLOCK, &mask, NULL);
-# else
- assert (which == 1);
- sighold (SIGUSR1);
- while (!caught_sigusr1)
- sigpause(SIGUSR1);
- caught_sigusr1 = 0;
- sigrelease(SIGUSR1);
-# endif /*!HAVE_SIGPROCMASK*/
-#endif
-}
-
static void
-do_block( int block )
+do_block (int block)
{
-#ifndef HAVE_DOSISH_SYSTEM
+#ifdef HAVE_DOSISH_SYSTEM
+ (void)block;
+#else /*!HAVE_DOSISH_SYSTEM*/
static int is_blocked;
#ifdef HAVE_SIGPROCMASK
static sigset_t oldmask;
@@ -247,7 +222,7 @@ do_block( int block )
is_blocked = 0;
}
#endif /*!HAVE_SIGPROCMASK*/
-#endif /*HAVE_DOSISH_SYSTEM*/
+#endif /*!HAVE_DOSISH_SYSTEM*/
}