Skip to content

Commit

Permalink
job control: don't kill PTY processes on exit
Browse files Browse the repository at this point in the history
These will automatically recieve SIGHUP on closing PTY master.
  • Loading branch information
bfredl committed Jan 20, 2016
1 parent 4618307 commit f6ecd12
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/nvim/event/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,14 @@ void process_teardown(Loop *loop) FUNC_ATTR_NONNULL_ALL
// Close handles to process without killing it.
CREATE_EVENT(loop->events, process_close_handles, 1, proc);
} else {
uv_kill(proc->pid, SIGTERM);
proc->term_sent = true;
process_stop(proc);
if (proc->type == kProcessTypeUv) {
uv_kill(proc->pid, SIGTERM);
proc->term_sent = true;
process_stop(proc);
} else { // kProcessTypePty
process_close_streams(proc);
pty_process_close_master((PtyProcess *)proc);
}
}
}

Expand Down

0 comments on commit f6ecd12

Please sign in to comment.