File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4474,21 +4474,27 @@ job_status({job}) *job_status()* *E916*
44744474job_stop({job} [, {how} ]) *job_stop()*
44754475 Stop the {job} . This can also be used to signal the job.
44764476
4477- When {how} is omitted or is "term" the job will be terminated
4478- normally. For Unix SIGTERM is sent. For MS-Windows
4479- CTRL_BREAK will be sent. This goes to the process group, thus
4480- children may also be affected.
4481-
4482- Other values for Unix:
4483- "hup" Unix: SIGHUP
4484- "quit" Unix: SIGQUIT
4485- "kill" Unix: SIGKILL (strongest way to stop)
4486- number Unix: signal with that number
4487-
4488- Other values for MS-Windows:
4489- "int" Windows: CTRL_C
4490- "kill" Windows: terminate process forcedly
4491- Others Windows: CTRL_BREAK
4477+ When {how} is omitted or is "term" the job will be terminated.
4478+ For Unix SIGTERM is sent. On MS-Windows the job will be
4479+ terminated forcedly (there is no "gentle" way).
4480+ This goes to the process group, thus children may also be
4481+ affected.
4482+
4483+ Effect for Unix:
4484+ "term" SIGTERM (default)
4485+ "hup" SIGHUP
4486+ "quit" SIGQUIT
4487+ "int" SIGINT
4488+ "kill" SIGKILL (strongest way to stop)
4489+ number signal with that number
4490+
4491+ Effect for MS-Windows:
4492+ "term" terminate process forcedly (default)
4493+ "hup" CTRL_BREAK
4494+ "quit" CTRL_BREAK
4495+ "int" CTRL_C
4496+ "kill" terminate process forcedly
4497+ Others CTRL_BREAK
44924498
44934499 On Unix the signal is sent to the process group. This means
44944500 that when the job is "sh -c command" it affects both the shell
Original file line number Diff line number Diff line change @@ -5202,12 +5202,14 @@ mch_stop_job(job_T *job, char_u *how)
52025202 int sig = -1 ;
52035203 pid_t job_pid ;
52045204
5205- if (STRCMP (how , "hup" ) == 0 )
5206- sig = SIGHUP ;
5207- else if (* how == NUL || STRCMP (how , "term" ) == 0 )
5205+ if (* how == NUL || STRCMP (how , "term" ) == 0 )
52085206 sig = SIGTERM ;
5207+ else if (STRCMP (how , "hup" ) == 0 )
5208+ sig = SIGHUP ;
52095209 else if (STRCMP (how , "quit" ) == 0 )
52105210 sig = SIGQUIT ;
5211+ else if (STRCMP (how , "int" ) == 0 )
5212+ sig = SIGINT ;
52115213 else if (STRCMP (how , "kill" ) == 0 )
52125214 sig = SIGKILL ;
52135215 else if (isdigit (* how ))
Original file line number Diff line number Diff line change @@ -5141,10 +5141,9 @@ mch_job_status(job_T *job)
51415141 int
51425142mch_stop_job (job_T * job , char_u * how )
51435143{
5144- int ret = 0 ;
5145- int ctrl_c = STRCMP (how , "int" ) == 0 ;
5144+ int ret ;
51465145
5147- if (STRCMP (how , "kill" ) == 0 )
5146+ if (STRCMP (how , "term" ) == 0 || STRCMP ( how , " kill" ) == 0 || * how == NUL )
51485147 {
51495148 if (job -> jv_job_object != NULL )
51505149 return TerminateJobObject (job -> jv_job_object , 0 ) ? OK : FAIL ;
@@ -5155,9 +5154,9 @@ mch_stop_job(job_T *job, char_u *how)
51555154 if (!AttachConsole (job -> jv_proc_info .dwProcessId ))
51565155 return FAIL ;
51575156 ret = GenerateConsoleCtrlEvent (
5158- ctrl_c ? CTRL_C_EVENT : CTRL_BREAK_EVENT ,
5159- job -> jv_proc_info .dwProcessId )
5160- ? OK : FAIL ;
5157+ STRCMP ( how , "int" ) == 0 ? CTRL_C_EVENT : CTRL_BREAK_EVENT ,
5158+ job -> jv_proc_info .dwProcessId )
5159+ ? OK : FAIL ;
51615160 FreeConsole ();
51625161 return ret ;
51635162}
Original file line number Diff line number Diff line change @@ -748,6 +748,8 @@ static char *(features[]) =
748748
749749static int included_patches [] =
750750{ /* Add new patch number below this line */
751+ /**/
752+ 1418 ,
751753/**/
752754 1417 ,
753755/**/
You can’t perform that action at this time.
0 commit comments