diff src/eval.c @ 10386:d3f0946b4a80 v8.0.0087

commit https://github.com/vim/vim/commit/7df915d113ac1981792c50e8b000c9f5f784b78b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 17 17:25:32 2016 +0100 patch 8.0.0087 Problem: When the channel callback gets job info the job may already have been deleted. (lifepillar) Solution: Do not delete the job when the channel is still useful. (ichizok, closes #1242, closes #1245)
author Christian Brabandt <cb@256bit.org>
date Thu, 17 Nov 2016 17:30:04 +0100
parents 14a82c6433be
children 6ddf322ff7cf
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -7290,7 +7290,7 @@ get_tv_string_buf_chk(typval_T *varp, ch
 		if (job == NULL)
 		    return (char_u *)"no process";
 		status = job->jv_status == JOB_FAILED ? "fail"
-				: job->jv_status == JOB_ENDED ? "dead"
+				: job->jv_status >= JOB_ENDED ? "dead"
 				: "run";
 # ifdef UNIX
 		vim_snprintf((char *)buf, NUMBUFLEN,