diff --git a/Userland/Libraries/LibTest/CrashTest.cpp b/Userland/Libraries/LibTest/CrashTest.cpp index 5eba071c75..bcb7b83f1a 100644 --- a/Userland/Libraries/LibTest/CrashTest.cpp +++ b/Userland/Libraries/LibTest/CrashTest.cpp @@ -6,10 +6,15 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include +#ifndef AK_OS_MACOS +# include +#endif + namespace Test { Crash::Crash(String test_type, Function crash_function) @@ -49,6 +54,10 @@ bool Crash::run(RunType run_type) perror("fork"); VERIFY_NOT_REACHED(); } else if (pid == 0) { +#ifndef AK_OS_MACOS + if (prctl(PR_SET_DUMPABLE, 0, 0) < 0) + perror("prctl(PR_SET_DUMPABLE)"); +#endif run_crash_and_print_if_error(); exit(0); }