term_restore() now restarts itself so we don't need to do it ourselves.
This commit is contained in:
@@ -367,11 +367,8 @@ suspend_parent(int signo)
|
|||||||
del_io_events();
|
del_io_events();
|
||||||
|
|
||||||
/* Restore original tty mode before suspending. */
|
/* Restore original tty mode before suspending. */
|
||||||
if (ttymode != TERM_COOKED) {
|
if (ttymode != TERM_COOKED)
|
||||||
do {
|
term_restore(io_fds[SFD_USERTTY], 0);
|
||||||
n = term_restore(io_fds[SFD_USERTTY], 0);
|
|
||||||
} while (!n && errno == EINTR);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sig2str(signo, signame) == -1)
|
if (sig2str(signo, signame) == -1)
|
||||||
snprintf(signame, sizeof(signame), "%d", signo);
|
snprintf(signame, sizeof(signame), "%d", signo);
|
||||||
@@ -817,11 +814,8 @@ pty_close(struct command_status *cstat)
|
|||||||
/* Restore terminal settings. */
|
/* Restore terminal settings. */
|
||||||
if (io_fds[SFD_USERTTY] != -1) {
|
if (io_fds[SFD_USERTTY] != -1) {
|
||||||
check_foreground();
|
check_foreground();
|
||||||
if (foreground) {
|
if (foreground)
|
||||||
do {
|
term_restore(io_fds[SFD_USERTTY], 0);
|
||||||
n = term_restore(io_fds[SFD_USERTTY], 0);
|
|
||||||
} while (!n && errno == EINTR);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If child was signalled, write the reason to stdout like the shell. */
|
/* If child was signalled, write the reason to stdout like the shell. */
|
||||||
|
Reference in New Issue
Block a user