1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:05:08 +00:00

LibLine: Ignore interrupts unless actively editing

It does not make much sense to receive an interrupt and process it
*much later*.
Also patches Userland/js to only create exceptions while some code is
actually running.
This commit is contained in:
AnotherTest 2020-04-29 00:31:22 +04:30 committed by Andreas Kling
parent 8b195d1211
commit 7ecf29f206
3 changed files with 14 additions and 2 deletions

View file

@ -421,7 +421,8 @@ int main(int argc, char** argv)
s_editor = make<Line::Editor>();
signal(SIGINT, [](int) {
sigint_handler();
if (!s_editor->is_editing())
sigint_handler();
s_editor->interrupted();
});