mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 7.4.1294
Problem: job_stop() only kills the started process. Solution: Send the signal to the process group. (Olaf Dabrunz)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user