From edefcc7f3ab9d05041de262d72e817daa68957a3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 4 Aug 2020 13:53:43 +0200 Subject: [PATCH] Taskbar: Disown quick-launched programs --- Services/Taskbar/TaskbarWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Services/Taskbar/TaskbarWindow.cpp b/Services/Taskbar/TaskbarWindow.cpp index 90620d9637b..dd69c96dcd5 100644 --- a/Services/Taskbar/TaskbarWindow.cpp +++ b/Services/Taskbar/TaskbarWindow.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include //#define EVENT_DEBUG @@ -45,10 +46,10 @@ class TaskbarWidget final : public GUI::Widget { C_OBJECT(TaskbarWidget); public: - virtual ~TaskbarWidget() override {} + virtual ~TaskbarWidget() override { } private: - TaskbarWidget() {} + TaskbarWidget() { } virtual void paint_event(GUI::PaintEvent& event) override { @@ -126,6 +127,9 @@ void TaskbarWindow::create_quick_launch_bar() execl(app_executable.characters(), app_executable.characters(), nullptr); perror("execl"); ASSERT_NOT_REACHED(); + } else { + if (disown(pid) < 0) + perror("disown"); } };