Skip to content

Commit 7280140

Browse files
committed
patch 7.4.1294
Problem: job_stop() only kills the started process. Solution: Send the signal to the process group. (Olaf Dabrunz)
1 parent e56bf15 commit 7280140

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/os_unix.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,11 @@ wait4pid(pid_t child, waitstatus *status)
39203920
}
39213921

39223922
#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+
*/
39233928
int
39243929
mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc)
39253930
{
@@ -5107,7 +5112,8 @@ mch_stop_job(job_T *job, char_u *how)
51075112
sig = atoi((char *)how);
51085113
else
51095114
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);
51115117
return OK;
51125118
}
51135119
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1294,
750752
/**/
751753
1293,
752754
/**/

0 commit comments

Comments
 (0)