(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 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
size_t sthreads;
int open_fhs;
pid_t pid; /* my pid */
+ const char *system_root;
void close_ctty ();
};
_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
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
}