From 02d8aaa2e8a767e41454c8b8b8d3d0f616caa7c0 Mon Sep 17 00:00:00 2001 From: Kemal Zebari Date: Wed, 17 Jan 2024 23:59:46 -0800 Subject: [PATCH] nohup: Use return code 127 for errors caught by serenity_main() For any errors that occur during the runtime of nohup, POSIX uses a 127 return code. --- Userland/Utilities/nohup.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Utilities/nohup.cpp b/Userland/Utilities/nohup.cpp index 6fa4ea55f4..826b0643c3 100644 --- a/Userland/Utilities/nohup.cpp +++ b/Userland/Utilities/nohup.cpp @@ -54,6 +54,7 @@ void dup_out_file(int fd_to_redirect) ErrorOr serenity_main(Main::Arguments arguments) { + Main::set_return_code_for_errors(127); TRY(Core::System::pledge("stdio wpath cpath rpath exec sigaction")); StringView utility;