+ T((T_CALLED("_nc_signal_handler(%d)"), enable));
+#if USE_SIGTSTP /* Xenix 2.x doesn't have SIGTSTP, for example */
+ {
+ static bool ignore_tstp = FALSE;
+
+ if (!ignore_tstp) {
+ static sigaction_t act, oact;
+
+ if (!enable) {
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGTSTP, &act, &oact);
+ } else if (act.sa_handler != SIG_DFL) {
+ sigaction(SIGTSTP, &oact, NULL);
+ } else if (sigaction(SIGTSTP, NULL, &oact) == 0
+ && (oact.sa_handler == SIG_DFL)) {
+ sigemptyset(&act.sa_mask);