diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index f0e5d77bcd..51d2b53bba 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -49,17 +50,7 @@ private: { if (event.button() != GUI::MouseButton::Primary) return; - - pid_t child_pid; - char const* argv[] = { "SystemMonitor", "-t", "network", nullptr }; - - if ((errno = posix_spawn(&child_pid, "/bin/SystemMonitor", nullptr, nullptr, const_cast(argv), environ))) { - perror("posix_spawn"); - return; - } - - if (disown(child_pid) < 0) - perror("disown"); + GUI::Process::spawn_or_show_error(window(), "/bin/SystemMonitor", Array { "-t", "network" }); } virtual void update_widget()