aboutsummaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'job.c')
-rw-r--r--job.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/job.c b/job.c
index 997a6574..6c1a3e09 100644
--- a/job.c
+++ b/job.c
@@ -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;