1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +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:
Sam Atkins 2022-03-19 17:06:56 +00:00 committed by Brian Gianforcaro
parent 60c228b914
commit 25c2a76d10
2 changed files with 20 additions and 1 deletions

View file

@ -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);