0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

patch 8.2.0952: no simple way to interrupt Vim

Problem:    No simple way to interrupt Vim.
Solution:   Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes,
            closes #1718)
This commit is contained in:
Bram Moolenaar
2020-06-10 20:56:58 +02:00
parent 6ba24d8763
commit be5ee8686a
8 changed files with 67 additions and 6 deletions

View File

@@ -2509,4 +2509,17 @@ func Test_autocmd_deep_nesting()
autocmd! BufEnter Xfile
endfunc
" Tests for SigUSR1 autocmd event, which is only available on posix systems.
func Test_autocmd_sigusr1()
CheckUnix
let g:sigusr1_passed = 0
au SigUSR1 * let g:sigusr1_passed = 1
call system('/bin/kill -s usr1 ' . getpid())
call WaitForAssert({-> assert_true(g:sigusr1_passed)})
au! SigUSR1
unlet g:sigusr1_passed
endfunc
" vim: shiftwidth=2 sts=2 expandtab