1
0
forked from aniani/vim

patch 8.2.0238: MS-Windows: job_stop() results in exit value zero

Problem:    MS-Windows: job_stop() results in exit value zero.
Solution:   Call TerminateJobObject() with -1 instead of 0. (Yasuhiro
            Matsumoto, closes #5150, closes #5614)
This commit is contained in:
Bram Moolenaar
2020-02-10 21:32:19 +01:00
parent 7ba3b91e03
commit b3e195cca7
3 changed files with 19 additions and 2 deletions

View File

@@ -5384,9 +5384,9 @@ mch_signal_job(job_T *job, char_u *how)
{
if (job->jv_channel != NULL && job->jv_channel->ch_anonymous_pipe)
job->jv_channel->ch_killing = TRUE;
return TerminateJobObject(job->jv_job_object, 0) ? OK : FAIL;
return TerminateJobObject(job->jv_job_object, -1) ? OK : FAIL;
}
return terminate_all(job->jv_proc_info.hProcess, 0) ? OK : FAIL;
return terminate_all(job->jv_proc_info.hProcess, -1) ? OK : FAIL;
}
if (!AttachConsole(job->jv_proc_info.dwProcessId))