diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-14 12:03:34 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-04-15 18:23:11 +0200 |
commit | 8fa0b8051dbe2f4e4a00c162913886a34bf78bfa (patch) | |
tree | a40e209b552921c4657280046e9573eb4e7dd759 /runtime | |
parent | c8f409c2f297180ee06b474ef59653aebb817a4a (diff) | |
download | rneovim-8fa0b8051dbe2f4e4a00c162913886a34bf78bfa.tar.gz rneovim-8fa0b8051dbe2f4e4a00c162913886a34bf78bfa.tar.bz2 rneovim-8fa0b8051dbe2f4e4a00c162913886a34bf78bfa.zip |
job-control: mitigate process-kill race
children_kill_cb() is racey. One obvious problem is that
process_close_handles() is *queued* by on_process_exit(), so when
children_kill_cb() is invoked, the dead process might still be in the
`loop->children` list. If the OS already reclaimed the dead PID, Nvim
may try to SIGKILL it.
Avoid that by checking `proc->status`.
Vim doesn't have this problem because it doesn't attempt to kill
processes that ignored SIGTERM after a timeout.
closes #8269
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 20f0eb303b..fffdcef8d9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5033,10 +5033,9 @@ jobstart({cmd}[, {opts}]) *jobstart()* width : (pty only) Width of the terminal screen height : (pty only) Height of the terminal screen TERM : (pty only) $TERM environment variable - detach : (non-pty only) Detach the job process from the - nvim process. The process will not get killed - when nvim exits. If the process dies before - nvim exits, "on_exit" will still be invoked. + detach : (non-pty only) Detach the job process: it will + not be killed when Nvim exits. If the process + exits before Nvim, "on_exit" will be invoked. {opts} is passed as |self| dictionary to the callback; the caller may set other keys to pass application-specific data. |