aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/pty_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/pty_process.c')
-rw-r--r--src/nvim/os/pty_process.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/nvim/os/pty_process.c b/src/nvim/os/pty_process.c
index c135efc6d3..9a2721f769 100644
--- a/src/nvim/os/pty_process.c
+++ b/src/nvim/os/pty_process.c
@@ -34,7 +34,6 @@
typedef struct {
struct winsize winsize;
uv_pipe_t proc_stdin, proc_stdout, proc_stderr;
- uv_signal_t schld;
int tty_fd;
} PtyProcess;
@@ -136,9 +135,6 @@ bool pty_process_spawn(Job *job) FUNC_ATTR_NONNULL_ALL
goto error;
}
- uv_signal_init(uv_default_loop(), &ptyproc->schld);
- uv_signal_start(&ptyproc->schld, chld_handler, SIGCHLD);
- ptyproc->schld.data = job;
ptyproc->tty_fd = master;
job->pid = pid;
return true;
@@ -162,9 +158,6 @@ error:
void pty_process_close(Job *job) FUNC_ATTR_NONNULL_ALL
{
- PtyProcess *ptyproc = job->process;
- uv_signal_stop(&ptyproc->schld);
- uv_close((uv_handle_t *)&ptyproc->schld, NULL);
pty_process_close_master(job);
job_close_streams(job);
job_decref(job);
@@ -207,31 +200,6 @@ static void init_child(Job *job) FUNC_ATTR_NONNULL_ALL
fprintf(stderr, "execvp failed: %s\n", strerror(errno));
}
-static void chld_handler(uv_signal_t *handle, int signum) FUNC_ATTR_NONNULL_ALL
-{
- Job *job = handle->data;
- int stat = 0;
-
- if (waitpid(job->pid, &stat, 0) < 0) {
- fprintf(stderr, "Waiting for pid %d failed: %s\n", job->pid,
- strerror(errno));
- return;
- }
-
- if (WIFSTOPPED(stat) || WIFCONTINUED(stat)) {
- // Did not exit
- return;
- }
-
- if (WIFEXITED(stat)) {
- job->status = WEXITSTATUS(stat);
- } else if (WIFSIGNALED(stat)) {
- job->status = WTERMSIG(stat);
- }
-
- pty_process_close(job);
-}
-
static void init_termios(struct termios *termios) FUNC_ATTR_NONNULL_ALL
{
memset(termios, 0, sizeof(struct termios));