diff options
author | nicm <nicm> | 2020-05-16 15:24:28 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 15:24:28 +0000 |
commit | 78595457f965975cf5a24e8bbab6dcb153020b6e (patch) | |
tree | 622695a4a91e2d3fd490d8f0b9e79aa48ae9bedc /job.c | |
parent | a3cbc014c386fd1f171e3139ed71c67503e1ccb3 (diff) | |
download | rtmux-78595457f965975cf5a24e8bbab6dcb153020b6e.tar.gz rtmux-78595457f965975cf5a24e8bbab6dcb153020b6e.tar.bz2 rtmux-78595457f965975cf5a24e8bbab6dcb153020b6e.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 <paths.h> @@ -285,6 +286,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; |