aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-10-07 16:49:30 +0000
committerChristopher Faylor <me@cgf.cx>2004-10-07 16:49:30 +0000
commit859d85dee0d52fb55ee9d98b16e7318f176f6bbe (patch)
tree3c10cb70ba75044273f3e18b20414d78f54a77cb
parent7c3db8ea2e668ae6e482900306d230c4fd0f50bf (diff)
downloadnewlib-859d85dee0d52fb55ee9d98b16e7318f176f6bbe.zip
newlib-859d85dee0d52fb55ee9d98b16e7318f176f6bbe.tar.gz
newlib-859d85dee0d52fb55ee9d98b16e7318f176f6bbe.tar.bz2
* 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.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/cygheap.h1
-rw-r--r--winsup/cygwin/spawn.cc4
3 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8ded614..90199f3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-07 Christopher Faylor <cgf@timesys.com>
+
+ * 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.
+
2004-10-07 Mark Paulus <mark.paulus@mci.com>
* fhandler_tty.cc (fhandler_tty_slave::read): Use previously
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index b8203bf..1ab3a7f 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -278,6 +278,7 @@ struct init_cygheap
size_t sthreads;
int open_fhs;
pid_t pid; /* my pid */
+ const char *system_root;
void close_ctty ();
};
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 0766b40..db4210b 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
}