diff options
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -19,14 +19,13 @@ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> +#include <sys/wait.h> #include <fcntl.h> -#include <paths.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <util.h> #include "tmux.h" @@ -285,6 +284,12 @@ job_check_died(pid_t pid, int status) } if (job == NULL) return; + if (WIFSTOPPED(status)) { + if (WSTOPSIG(status) == SIGTTIN || WSTOPSIG(status) == SIGTTOU) + return; + killpg(job->pid, SIGCONT); + return; + } log_debug("job died %p: %s, pid %ld", job, job->cmd, (long) job->pid); job->status = status; |