0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0445: getpgid is not supported on all systems

Problem:    Getpgid is not supported on all systems.
Solution:   Add a configure check.
This commit is contained in:
Bram Moolenaar
2017-03-11 20:03:42 +01:00
parent a95ab32120
commit 2fcf6688bc
5 changed files with 10 additions and 5 deletions

View File

@@ -3081,7 +3081,7 @@ executable_file(char_u *name)
}
/*
* Return 1 if "name" can be found in $PATH and executed, 0 if not.
* Return TRUE if "name" can be found in $PATH and executed, FALSE if not.
* If "use_path" is FALSE only check if "name" is executable.
* Return -1 if unknown.
*/
@@ -5429,8 +5429,10 @@ mch_stop_job(job_T *job, char_u *how)
/* TODO: have an option to only kill the process, not the group? */
job_pid = job->jv_pid;
#ifdef HAVE_GETPGID
if (job_pid == getpgid(job_pid))
job_pid = -job_pid;
#endif
kill(job_pid, sig);