Mercurial > vim
comparison src/os_unix.c @ 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 | b74549818500 |
children | 75e0831549f1 |
comparison
equal
deleted
inserted
replaced
7998:41192ec68349 | 7999:92ad477c6ab3 |
---|---|
3918 } | 3918 } |
3919 return wait_pid; | 3919 return wait_pid; |
3920 } | 3920 } |
3921 | 3921 |
3922 #if defined(FEAT_JOB) || !defined(USE_SYSTEM) || defined(PROTO) | 3922 #if defined(FEAT_JOB) || !defined(USE_SYSTEM) || defined(PROTO) |
3923 /* | |
3924 * Parse "cmd" and put the white-separated parts in "argv". | |
3925 * "argv" is an allocated array with "argc" entries. | |
3926 * Returns FAIL when out of memory. | |
3927 */ | |
3923 int | 3928 int |
3924 mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc) | 3929 mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc) |
3925 { | 3930 { |
3926 int i; | 3931 int i; |
3927 char_u *p; | 3932 char_u *p; |
5105 sig = SIGKILL; | 5110 sig = SIGKILL; |
5106 else if (isdigit(*how)) | 5111 else if (isdigit(*how)) |
5107 sig = atoi((char *)how); | 5112 sig = atoi((char *)how); |
5108 else | 5113 else |
5109 return FAIL; | 5114 return FAIL; |
5110 kill(job->jv_pid, sig); | 5115 /* TODO: have an option to only kill the process, not the group? */ |
5116 kill(-job->jv_pid, sig); | |
5111 return OK; | 5117 return OK; |
5112 } | 5118 } |
5113 #endif | 5119 #endif |
5114 | 5120 |
5115 /* | 5121 /* |