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:
ridiculousfish 2020-01-27 12:09:58 -08:00
parent 7d486c121a
commit af22d6b732

View File

@ -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