diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-01 09:02:44 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-01 09:02:44 +0100 |
commit | cc19203be2aab1adc4930b18e46d522005159412 (patch) | |
tree | 15d50f1af3bfa4017c47184c31aa6900e781c062 /job.c | |
parent | 7af58172457f74c6bb8e09625a07b2ddfeea2b8a (diff) | |
download | rtmux-cc19203be2aab1adc4930b18e46d522005159412.tar.gz rtmux-cc19203be2aab1adc4930b18e46d522005159412.tar.bz2 rtmux-cc19203be2aab1adc4930b18e46d522005159412.zip |
Add 'e' key in buffer mode to open the buffer in an editor.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> +#include <sys/wait.h> #include <fcntl.h> #include <signal.h> @@ -283,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; |