diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-09 11:37:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-09 11:37:50 +0100 |
commit | 7280140c08799f683ef31a6c1019e283c3dc13aa (patch) | |
tree | 2dc49e6f778c9354c7c953ef25dd10bb1399edf9 /src/os_unix.c | |
parent | e56bf15c163a921ce9e1c09c0d5b3a03efc63324 (diff) | |
download | vim-7280140c08799f683ef31a6c1019e283c3dc13aa.zip |
patch 7.4.1294
Problem: job_stop() only kills the started process.
Solution: Send the signal to the process group. (Olaf Dabrunz)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index a0e5ed0bc..17bb32268 100644 --- 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 |