diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-15 02:03:01 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-04-15 18:23:11 +0200 |
commit | b2c066409d19deb6228b7448e5c0367117031753 (patch) | |
tree | c769aebffd5e246d3faaafdfc1796b8bb3d649b7 /test | |
parent | 142ac021ac88387ef7319dc4eb1f430753480f44 (diff) | |
download | rneovim-b2c066409d19deb6228b7448e5c0367117031753.tar.gz rneovim-b2c066409d19deb6228b7448e5c0367117031753.tar.bz2 rneovim-b2c066409d19deb6228b7448e5c0367117031753.zip |
job-control: children_kill_cb(): do not check elapsed time
1. Don't check elapsed time in children_kill_cb(), it's already implied
by the start-time of the timer itself.
2. Restart timer from children_kill_cb() for PTY jobs, to send SIGKILL
after SIGTERM. There is an edge case where SIGKILL might follow
SIGTERM too quickly, if jobstop() is called near the 2-second timer
window. But this edge case is not worth code complication.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/autocmd/termclose_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/autocmd/termclose_spec.lua b/test/functional/autocmd/termclose_spec.lua index 0804579a4f..db4e5379d0 100644 --- a/test/functional/autocmd/termclose_spec.lua +++ b/test/functional/autocmd/termclose_spec.lua @@ -32,7 +32,7 @@ describe('TermClose event', function() end) it('kills job trapping SIGTERM', function() - if helpers.pending_win32(pending) then return end + if iswin() then return end nvim('set_option', 'shell', 'sh') nvim('set_option', 'shellcmdflag', '-c') command([[ let g:test_job = jobstart('trap "" TERM && echo 1 && sleep 60', { ]] @@ -51,8 +51,8 @@ describe('TermClose event', function() ok(duration <= 4000) -- Epsilon for slow CI end) - it('kills pty job trapping SIGHUP and SIGTERM', function() - if helpers.pending_win32(pending) then return end + it('kills PTY job trapping SIGHUP and SIGTERM', function() + if iswin() then return end nvim('set_option', 'shell', 'sh') nvim('set_option', 'shellcmdflag', '-c') command([[ let g:test_job = jobstart('trap "" HUP TERM && echo 1 && sleep 60', { ]] |