ソースを参照

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.
Kemal Zebari 1 年間 前
コミット
02d8aaa2e8
1 ファイル変更1 行追加0 行削除
  1. 1 0
      Userland/Utilities/nohup.cpp

+ 1 - 0
Userland/Utilities/nohup.cpp

@@ -54,6 +54,7 @@ void dup_out_file(int fd_to_redirect)
 
 ErrorOr<int> serenity_main(Main::Arguments arguments)
 {
+    Main::set_return_code_for_errors(127);
     TRY(Core::System::pledge("stdio wpath cpath rpath exec sigaction"));
 
     StringView utility;