summaryrefslogtreecommitdiff
path: root/Applications/SystemMonitor
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/SystemMonitor')
-rw-r--r--Applications/SystemMonitor/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index 1525e575ec..f644477927 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -55,6 +55,7 @@
#include <LibGUI/Window.h>
#include <LibGfx/Palette.h>
#include <LibPCIDB/Database.h>
+#include <serenity.h>
#include <signal.h>
#include <spawn.h>
#include <stdio.h>
@@ -222,6 +223,9 @@ int main(int argc, char** argv)
const char* argv[] = { "/bin/Profiler", "--pid", pid_string.characters(), nullptr };
if ((errno = posix_spawn(&child, "/bin/Profiler", nullptr, nullptr, const_cast<char**>(argv), environ))) {
perror("posix_spawn");
+ } else {
+ if (disown(child) < 0)
+ perror("disown");
}
}
});
@@ -235,6 +239,9 @@ int main(int argc, char** argv)
const char* argv[] = { "/bin/Inspector", pid_string.characters(), nullptr };
if ((errno = posix_spawn(&child, "/bin/Inspector", nullptr, nullptr, const_cast<char**>(argv), environ))) {
perror("posix_spawn");
+ } else {
+ if (disown(child) < 0)
+ perror("disown");
}
}
});