Skip to content

Instantly share code, notes, and snippets.

@miuirussia
Last active September 11, 2017 17:22
Show Gist options
  • Select an option

  • Save miuirussia/170ec710949ef5c1cd225fcf23192158 to your computer and use it in GitHub Desktop.

Select an option

Save miuirussia/170ec710949ef5c1cd225fcf23192158 to your computer and use it in GitHub Desktop.
From 511e0aa028b54ffee09da56f35d9cab17c1e4764 Mon Sep 17 00:00:00 2001
From: Kirill Kuznetsov <kirill.desirehd@gmail.com>
Date: Mon, 11 Sep 2017 20:14:53 +0300
Subject: [PATCH] [UNIX] Fix jobstop not killing processes with SIGKILL
---
src/nvim/event/process.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git i/src/nvim/event/process.c w/src/nvim/event/process.c
index 4429a65f9..2b284c68a 100644
--- i/src/nvim/event/process.c
+++ w/src/nvim/event/process.c
@@ -266,0 +267,2 @@ static void children_kill_cb(uv_timer_t *handle)
+ int pid = -getpgid(proc->pid);
+
@@ -268,2 +270,2 @@ static void children_kill_cb(uv_timer_t *handle)
- ILOG("Sending SIGTERM to pid %d", proc->pid);
- uv_kill(proc->pid, SIGTERM);
+ ILOG("Sending SIGTERM to pid %d", pid);
+ uv_kill(pid, SIGTERM);
@@ -272,2 +274,2 @@ static void children_kill_cb(uv_timer_t *handle)
- ILOG("Sending SIGKILL to pid %d", proc->pid);
- uv_kill(proc->pid, SIGKILL);
+ ILOG("Sending SIGKILL to pid %d", pid);
+ uv_kill(pid, SIGKILL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment