Closed yukunlin closed 4 years ago
The thing I'm worried about is that if we don't terminate jobs on exit, you could open Vim on a big project (launching a job), then you quit (the job keeps working), and then yo re-open Vim in the same project (launching a job). Now you've got 2 different processes reading from and writing to the same files, and that can't be good...
Ideally we would know that we are going to exit after writing the buffer, so we wouldn't trigger the job in the first place, but I can't think of a way to do that...
If the problem here is that it displays an error on exit, we can try to shut gutentags up with something like this maybe? https://gist.github.com/ludovicchabant/b3e0477d38d7817fac64d08944f03a35
The error message you mentioned is now suppressed. Thanks!
Terminating jobs on exit can lead to race conditions with
:x
on a changed buffer. In that scenario, the job updating the tags file can be prematurely terminated when vim exits.This issue started happening for me after updating to neovim 0.4.2. Error message after executing
:x
on a changed file, withlet g:gutentags_trace=1
.I suspect it's due to some changes between neovim and 0.3.8 and 0.4.2 that changed the timing of events that lead to jobs being terminated earlier on exit than before. The error code indicates failure from being killed by a signal (https://neovim.io/doc/user/job_control.html#on_exit).