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:
parent
7b0da10dd5
commit
e0fcfc8a99
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue