commit | 61a6605ea1201eb49a126ca696fcfc56caf5dca6 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Jul 22 18:39:00 2017 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Jul 22 18:39:00 2017 +0200 |
tree | 5b3aed6b0493301cfabfa088f59043d97081d6ed | |
parent | 9f1f49b839fbc5d099301d5318a5e1e70dd59b7c [diff] [blame] |
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)
diff --git a/src/os_unix.c b/src/os_unix.c index 156168f..bbc74c7 100644 --- a/src/os_unix.c +++ b/src/os_unix.c
@@ -5475,7 +5475,9 @@ job_pid = -job_pid; #endif - kill(job_pid, sig); + /* Never kill ourselves! */ + if (job_pid != 0) + kill(job_pid, sig); return OK; }