On Wed, Feb 24, 2016 at 8:11 PM, mattn <mattn...@gmail.com> wrote: > I'm thinking "kill" is not matter for this test because this test should > be checking of exit. > > diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim > index 69922b1..e74e54c 100644 > --- a/src/testdir/test_channel.vim > +++ b/src/testdir/test_channel.vim > @@ -483,6 +483,7 @@ func Test_exit_callback() > if has('job') > call s:run_server('s:test_exit_callback') > > + call job_stop(s:exit_job, "kill") > " the job may take a little while to exit > sleep 50m >
In CUI Vim, job_stop(job, "hup") doesn't work because AttachConsole() fails. The following patch might fix it. Job process is created in same console. I'm not sure if it doesn't causes another problem. diff --git a/src/os_win32.c b/src/os_win32.c index e93e6d0..5c45ff2 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -5071,8 +5071,7 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options) if (!vim_create_process(cmd, TRUE, CREATE_SUSPENDED | CREATE_DEFAULT_ERROR_MODE | - CREATE_NEW_PROCESS_GROUP | - CREATE_NEW_CONSOLE, + CREATE_NEW_PROCESS_GROUP, &si, &pi)) { CloseHandle(jo); @@ -5152,13 +5151,17 @@ mch_stop_job(job_T *job, char_u *how) return TerminateProcess(job->jv_proc_info.hProcess, 0) ? OK : FAIL; } +#ifdef FEAT_GUI_W32 if (!AttachConsole(job->jv_proc_info.dwProcessId)) return FAIL; +#endif ret = GenerateConsoleCtrlEvent( ctrl_c ? CTRL_C_EVENT : CTRL_BREAK_EVENT, job->jv_proc_info.dwProcessId) ? OK : FAIL; +#ifdef FEAT_GUI_W32 FreeConsole(); +#endif return ret; } -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.