mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Stop pretending to be interactive during the cancellation tests
Prior to this fix, the cancellation C++ test would mark the parser as interactive in an effort to install interactive signal handling (so that, for example, SIGINT would stop the job and return control to the user). However this flag would also cause fish to attempt to save and restore tty modes across the job. This would fail since there is no tty, and so the job would fail with an unexpected error code. We don't need to mark the parser as interactive, we can just remove that line. Fixes #6539.
This commit is contained in:
@@ -1049,7 +1049,6 @@ static void test_cancellation() {
|
||||
// Enable fish's signal handling here. We need to make this interactive for fish to install its
|
||||
// signal handlers.
|
||||
parser_t &parser = parser_t::principal_parser();
|
||||
scoped_push<bool> interactive{&parser.libdata().is_interactive, true};
|
||||
signal_set_handlers(true);
|
||||
|
||||
// This tests that we can correctly ctrl-C out of certain loop constructs, and that nothing gets
|
||||
|
||||
Reference in New Issue
Block a user