From 261c55beca620b2f9fa9d5ac50fedf3560828c9c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:19:39 +0200 Subject: [PATCH] Clean up docker.pid file in /var/run/user (#126) Co-authored-by: Mattias Axelsson --- app/dockerdwrapperwithcompose.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/dockerdwrapperwithcompose.c b/app/dockerdwrapperwithcompose.c index c3e0059..3d26a54 100644 --- a/app/dockerdwrapperwithcompose.c +++ b/app/dockerdwrapperwithcompose.c @@ -727,9 +727,9 @@ static void dockerd_process_exited_callback(GPid pid, gint status, gpointer app_ dockerd_process_pid = -1; g_spawn_close_pid(pid); - // The lockfile might have been left behind if dockerd shut down in a bad - // manner. Remove it manually. - remove("/var/run/docker.pid"); + // The lockfile might have been left behind if dockerd shut down in a bad manner. + g_autofree char* pid_path = g_strdup_printf("/var/run/user/%d/docker.pid", getuid()); + remove(pid_path); main_loop_quit(); // Trigger a restart of dockerd from main() }