From 859d85dee0d52fb55ee9d98b16e7318f176f6bbe Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 7 Oct 2004 16:49:30 +0000 Subject: * spawn.cc (pthread_cleanup::oldmask): Default to invalid signal mask. (do_cleanup): Test for invalid signal mask to decide whether to restore the mask rather than assuming zero mask indicates that there is nothing to do. --- winsup/cygwin/spawn.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 0766b40a7..db4210b31 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -326,7 +326,7 @@ struct pthread_cleanup _sig_func_ptr oldint; _sig_func_ptr oldquit; sigset_t oldmask; - pthread_cleanup (): oldint (NULL), oldquit (NULL), oldmask (0) {} + pthread_cleanup (): oldint (NULL), oldquit (NULL), oldmask ((sigset_t) -1) {} }; static void @@ -337,7 +337,7 @@ do_cleanup (void *args) signal (SIGINT, cleanup->oldint); if (cleanup->oldquit) signal (SIGQUIT, cleanup->oldquit); - if (cleanup->oldmask) + if (cleanup->oldmask != (sigset_t) -1) sigprocmask (SIG_SETMASK, &(cleanup->oldmask), NULL); # undef cleanup } -- cgit v1.2.3