1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0572
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0572
Problem: Stopping a job does not work properly on OpenBSD.
Solution: Do not use getpgid() to check the process group of the job
processs ID, always pass the negative process ID to kill().
(George Koehler, closes #3656)
Files: src/os_unix.c
*** ../vim-8.1.0571/src/os_unix.c 2018-11-12 21:45:04.596729428 +0100
--- src/os_unix.c 2018-12-08 14:37:24.207684926 +0100
***************
*** 5820,5826 ****
mch_signal_job(job_T *job, char_u *how)
{
int sig = -1;
- pid_t job_pid;
if (*how == NUL || STRCMP(how, "term") == 0)
sig = SIGTERM;
--- 5820,5825 ----
***************
*** 5841,5856 ****
else
return FAIL;
! /* 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
!
! /* Never kill ourselves! */
! if (job_pid != 0)
! kill(job_pid, sig);
return OK;
}
--- 5840,5852 ----
else
return FAIL;
! // Never kill ourselves!
! if (job->jv_pid != 0)
! {
! // TODO: have an option to only kill the process, not the group?
! kill(-job->jv_pid, sig);
! kill(job->jv_pid, sig);
! }
return OK;
}
*** ../vim-8.1.0571/src/version.c 2018-12-08 13:57:38.553692769 +0100
--- src/version.c 2018-12-08 14:38:11.875404358 +0100
***************
*** 794,795 ****
--- 794,797 ----
{ /* Add new patch number below this line */
+ /**/
+ 572,
/**/
--
FIRST VILLAGER: We have found a witch. May we burn her?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|