mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibLinEdit + Shell: handle signals
This allows the LineEditor to get notified about signals, since we cannot set signal handlers in a clean way within the LineEditor instance.
This commit is contained in:
parent
21c4c67119
commit
5062a7d4cd
Notes:
sideshowbarker
2024-07-19 08:02:12 +09:00
Author: https://github.com/alimpfard
Commit: 5062a7d4cd
Pull-request: https://github.com/SerenityOS/serenity/pull/1539
3 changed files with 12 additions and 12 deletions
|
@ -1154,14 +1154,16 @@ int main(int argc, char** argv)
|
|||
|
||||
signal(SIGINT, [](int) {
|
||||
g.was_interrupted = true;
|
||||
});
|
||||
|
||||
signal(SIGHUP, [](int) {
|
||||
save_history();
|
||||
editor.interrupted();
|
||||
});
|
||||
|
||||
signal(SIGWINCH, [](int) {
|
||||
g.was_resized = true;
|
||||
editor.resized();
|
||||
});
|
||||
|
||||
signal(SIGHUP, [](int) {
|
||||
save_history();
|
||||
});
|
||||
|
||||
int rc = gethostname(g.hostname, sizeof(g.hostname));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue