Move cgroup dbus requests to the child to avoid a race where a spawned child

that quickly forks will have only the parent process moved to the newly created
cgroup. From Daniel De Graaf, GitHub issue 4435.
This commit is contained in:
Nicholas Marriott
2025-04-14 07:26:05 +01:00
parent ac2779f4d8
commit f0a85d0469
3 changed files with 114 additions and 22 deletions

View File

@ -450,7 +450,7 @@ void *recallocarray(void *, size_t, size_t, size_t);
/* systemd.c */
int systemd_activated(void);
int systemd_create_socket(int, char **);
int systemd_move_pid_to_new_cgroup(pid_t, char **);
int systemd_move_to_new_cgroup(char **);
#endif
#ifdef HAVE_UTF8PROC