changeset 7999:92ad477c6ab3 v7.4.1294

commit https://github.com/vim/vim/commit/7280140c08799f683ef31a6c1019e283c3dc13aa Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 9 11:37:50 2016 +0100 patch 7.4.1294 Problem: job_stop() only kills the started process. Solution: Send the signal to the process group. (Olaf Dabrunz)
author Christian Brabandt <cb@256bit.org>
date Tue, 09 Feb 2016 11:45:05 +0100
parents 41192ec68349
children 870d9baa0314
files src/os_unix.c src/version.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3920,6 +3920,11 @@ wait4pid(pid_t child, waitstatus *status
 }
 
 #if defined(FEAT_JOB) || !defined(USE_SYSTEM) || defined(PROTO)
+/*
+ * Parse "cmd" and put the white-separated parts in "argv".
+ * "argv" is an allocated array with "argc" entries.
+ * Returns FAIL when out of memory.
+ */
     int
 mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc)
 {
@@ -5107,7 +5112,8 @@ mch_stop_job(job_T *job, char_u *how)
 	sig = atoi((char *)how);
     else
 	return FAIL;
-    kill(job->jv_pid, sig);
+    /* TODO: have an option to only kill the process, not the group? */
+    kill(-job->jv_pid, sig);
     return OK;
 }
 #endif
--- a/src/version.c
+++ b/src/version.c
@@ -748,6 +748,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1294,
+/**/
     1293,
 /**/
     1292,