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

patch 8.0.0746: when :term fails the job is not properly cleaned up

Problem:    When :term fails the job is not properly cleaned up.
Solution:   Free the terminal. Handle a job that failed to start. (closes
            #1858)
This commit is contained in:
Bram Moolenaar
2017-07-22 18:39:00 +02:00
parent 9f1f49b839
commit 61a6605ea1
4 changed files with 18 additions and 3 deletions

View File

@@ -5475,7 +5475,9 @@ mch_stop_job(job_T *job, char_u *how)
job_pid = -job_pid;
#endif
kill(job_pid, sig);
/* Never kill ourselves! */
if (job_pid != 0)
kill(job_pid, sig);
return OK;
}