mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-14 05:31:14 -03:00
Migrate certain runtime flags to atomics hidden behind functions
This commit is contained in:
@@ -1031,10 +1031,11 @@ static void test_cancellation() {
|
||||
// Test for #3780
|
||||
// Ugly hack - temporarily set is_interactive_session
|
||||
// else we will SIGINT ourselves in response to our child death
|
||||
scoped_push<bool> iis(&is_interactive_session, true);
|
||||
bool iis = is_interactive_session();
|
||||
set_interactive_session(true);
|
||||
const wchar_t *child_self_destructor = L"while true ; sh -c 'sleep .25; kill -s INT $$' ; end";
|
||||
parser_t::principal_parser().eval(child_self_destructor, io_chain_t(), TOP);
|
||||
iis.restore();
|
||||
set_interactive_session(iis);
|
||||
|
||||
// Restore signal handling.
|
||||
proc_pop_interactive();
|
||||
|
||||
Reference in New Issue
Block a user