Skip to content

Commit

Permalink
Clean up docker.pid file in /var/run/user (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
killenheladagen authored Apr 18, 2024
1 parent 7f162aa commit bce495f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/dockerdwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit bce495f

Please sign in to comment.