summaryrefslogtreecommitdiff
path: root/Userland/Services/CrashDaemon
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-11-20 13:33:50 +0200
committerLinus Groh <mail@linusgroh.de>2021-11-20 21:22:24 +0000
commitd6d48ce9368c4fa670ab185a23d568c169d08fdb (patch)
tree9ba5f5f4335c5d9d1456bba1256ce4c0586ec7ba /Userland/Services/CrashDaemon
parent1c0a7cde63ae4f3a29a5a09f3b78e92fff5b36a5 (diff)
downloadserenity-d6d48ce9368c4fa670ab185a23d568c169d08fdb.zip
CrashReporter: Unlink coredump file on exit
Previously, when the --unlink flag was passed to CrashReporter, it unlinked the coredump file immediately after reading it. This change makes it so the coredump file is deleted when CrashReporter exits.
Diffstat (limited to 'Userland/Services/CrashDaemon')
-rw-r--r--Userland/Services/CrashDaemon/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/CrashDaemon/main.cpp b/Userland/Services/CrashDaemon/main.cpp
index d9f258d88c..76c9029797 100644
--- a/Userland/Services/CrashDaemon/main.cpp
+++ b/Userland/Services/CrashDaemon/main.cpp
@@ -29,11 +29,11 @@ static void wait_until_coredump_is_ready(const String& coredump_path)
}
}
-static void launch_crash_reporter(const String& coredump_path, bool unlink_after_use)
+static void launch_crash_reporter(const String& coredump_path, bool unlink_on_exit)
{
pid_t child;
const char* argv[4] = { "CrashReporter" };
- if (unlink_after_use) {
+ if (unlink_on_exit) {
argv[1] = "--unlink";
argv[2] = coredump_path.characters();
argv[3] = nullptr;