mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibMain: Add the ability to configure the exit code on error
Some POSIX utilities are specified to return a specific value on error, which is not 1. `Main::set_return_code_for_errors()` lets you set it to that value.
This commit is contained in:
parent
60c228b914
commit
25c2a76d10
Notes:
sideshowbarker
2024-07-17 17:06:40 +09:00
Author: https://github.com/AtkinsSJ
Commit: 25c2a76d10
Pull-request: https://github.com/SerenityOS/serenity/pull/13137
Reviewed-by: https://github.com/bgianfo ✅
2 changed files with 20 additions and 1 deletions
|
@ -19,6 +19,9 @@ struct Arguments {
|
|||
Span<StringView> strings;
|
||||
};
|
||||
|
||||
int return_code_for_errors();
|
||||
void set_return_code_for_errors(int);
|
||||
|
||||
}
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue