Mercurial > vim
comparison src/os_unix.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 | 2055d3722c5b |
children | 42911b233245 |
comparison
equal
deleted
inserted
replaced
10385:368468ef35cf | 10386:d3f0946b4a80 |
---|---|
5352 goto return_dead; | 5352 goto return_dead; |
5353 } | 5353 } |
5354 return "run"; | 5354 return "run"; |
5355 | 5355 |
5356 return_dead: | 5356 return_dead: |
5357 if (job->jv_status != JOB_ENDED) | 5357 if (job->jv_status < JOB_ENDED) |
5358 { | 5358 { |
5359 ch_log(job->jv_channel, "Job ended"); | 5359 ch_log(job->jv_channel, "Job ended"); |
5360 job->jv_status = JOB_ENDED; | 5360 job->jv_status = JOB_ENDED; |
5361 } | 5361 } |
5362 return "dead"; | 5362 return "dead"; |
5396 if (WIFEXITED(status)) | 5396 if (WIFEXITED(status)) |
5397 /* LINTED avoid "bitwise operation on signed value" */ | 5397 /* LINTED avoid "bitwise operation on signed value" */ |
5398 job->jv_exitval = WEXITSTATUS(status); | 5398 job->jv_exitval = WEXITSTATUS(status); |
5399 else if (WIFSIGNALED(status)) | 5399 else if (WIFSIGNALED(status)) |
5400 job->jv_exitval = -1; | 5400 job->jv_exitval = -1; |
5401 if (job->jv_status != JOB_ENDED) | 5401 if (job->jv_status < JOB_ENDED) |
5402 { | 5402 { |
5403 ch_log(job->jv_channel, "Job ended"); | 5403 ch_log(job->jv_channel, "Job ended"); |
5404 job->jv_status = JOB_ENDED; | 5404 job->jv_status = JOB_ENDED; |
5405 } | 5405 } |
5406 return job; | 5406 return job; |