1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

less: Ignore SIGINT signals

This matches the behavior of less on Linux and FreeBSD.
This commit is contained in:
Tim Ledbetter 2023-07-12 19:41:04 +01:00 committed by Andreas Kling
parent 7b0da10dd5
commit e0fcfc8a99

View file

@ -554,6 +554,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
teardown_action.sa_handler = teardown_sigaction_handler;
TRY(Core::System::sigaction(SIGTERM, &teardown_action, nullptr));
struct sigaction ignore_action;
ignore_action.sa_handler = { SIG_IGN };
TRY(Core::System::sigaction(SIGINT, &ignore_action, nullptr));
Pager pager(filename, file, stdout, prompt);
pager.init();