mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
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.
This commit is contained in:
parent
1c0a7cde63
commit
d6d48ce936
2 changed files with 24 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue