mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 09:31:47 +00:00
Merge #41376 from justinmk/fixci
This commit is contained in:
@@ -66,9 +66,25 @@ void signal_init(void)
|
||||
signal_start();
|
||||
}
|
||||
|
||||
/// During shutdown, we don't want the default actions of these signals.
|
||||
///
|
||||
/// Note: Windows still has the race. See 5a7113128201 for attempted fix.
|
||||
static void signal_ignore_deadly(void)
|
||||
{
|
||||
#ifndef MSWIN
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
signal(SIGINT, SIG_IGN);
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
# ifdef SIGQUIT
|
||||
signal(SIGQUIT, SIG_IGN);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void signal_teardown(void)
|
||||
{
|
||||
signal_stop();
|
||||
signal_ignore_deadly();
|
||||
signal_watcher_close(&spipe, NULL);
|
||||
signal_watcher_close(&shup, NULL);
|
||||
signal_watcher_close(&sint, NULL);
|
||||
|
||||
@@ -3254,11 +3254,7 @@ describe('API', function()
|
||||
-- On Windows, even though Nvim TUI handles SIGHUP, it's not possible for the
|
||||
-- parent process to know that, so exit code reflects SIGHUP.
|
||||
expected2.exitcode = (is_os('win') and 129 or 1)
|
||||
local chaninfo2 = eval('nvim_get_chan_info(&channel)')
|
||||
if t.is_asan() and chaninfo2.exitcode == 129 then
|
||||
expected2.exitcode = 129 -- FIXME: SIGHUP sometimes isn't caught with ASAN. 96d6042689064
|
||||
end
|
||||
eq(expected2, chaninfo2)
|
||||
eq(expected2, eval('nvim_get_chan_info(&channel)'))
|
||||
|
||||
-- :terminal with args + stopped process (shell-test).
|
||||
command('enew')
|
||||
|
||||
@@ -138,8 +138,7 @@ describe("preserve and (R)ecover with custom 'directory'", function()
|
||||
-- n.exec_lua([[vim.uv.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]])
|
||||
command('call chanclose(&channel)') -- Kill the child process.
|
||||
-- Wait for the child process to stop.
|
||||
-- FIXME: SIGHUP sometimes isn't caught with ASAN.
|
||||
screen0:expect({ any = t.is_asan() and '%[Process exited %d+%]' or '%[Process exited 1%]' })
|
||||
screen0:expect({ any = '%[Process exited 1%]' })
|
||||
neq(nil, uv.fs_stat(swappath1))
|
||||
test_recover(swappath1)
|
||||
end)
|
||||
|
||||
@@ -3669,8 +3669,10 @@ describe('TUI', function()
|
||||
retry(nil, 2000, function()
|
||||
eq(vim.NIL, api.nvim_get_proc(pid))
|
||||
end)
|
||||
-- FIXME: SIGHUP sometimes isn't caught with ASAN.
|
||||
screen:expect({ any = t.is_asan() and '%[Process exited %d+%]' or '%[Process exited 1%]' })
|
||||
-- On Windows the console terminates the child with STATUS_CONTROL_C_EXIT (-1073741510).
|
||||
screen:expect({
|
||||
any = is_os('win') and '%[Process exited %-?%d+%]' or '%[Process exited 1%]',
|
||||
})
|
||||
-- Closing stdin must skip the DA1 wait.
|
||||
t.assert_nolog('timed out waiting for DA1 response', testlog, 100)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user