{
reset_tty(ctl);
fflush(NULL);
- kill(0, SIGSTOP);
- /* We're back */
+ kill(getpid(), SIGSTOP);
+}
+
+/* Come here when we get a continue signal from the terminal */
+static void sigcont_handler(struct more_control *ctl)
+{
set_tty(ctl);
}
case SIGTSTP:
sigtstp_handler(ctl);
break;
+ case SIGCONT:
+ sigcont_handler(ctl);
+ break;
case SIGWINCH:
sigwinch_handler(ctl);
break;
sigaddset(&ctl.sigset, SIGINT);
sigaddset(&ctl.sigset, SIGQUIT);
sigaddset(&ctl.sigset, SIGTSTP);
+ sigaddset(&ctl.sigset, SIGCONT);
sigaddset(&ctl.sigset, SIGWINCH);
sigprocmask(SIG_BLOCK, &ctl.sigset, NULL);
ctl.sigfd = signalfd(-1, &ctl.sigset, SFD_CLOEXEC);