tree-wide: Migrate to pidref_safe_fork()

Let's migrate all remaining callers of safe_fork()
to pidref_safe_fork() and get rid of safe_fork().
This commit is contained in:
Daan De Meyer
2026-01-02 20:08:41 +01:00
committed by DaanDeMeyer
parent e6703a9aa4
commit 52ecf376fa
60 changed files with 321 additions and 303 deletions
+3 -3
View File
@@ -301,7 +301,7 @@ int import_mangle_os_tree_fd_foreign(
assert(tree_fd >= 0);
assert(userns_fd >= 0);
r = safe_fork_full(
r = pidref_safe_fork_full(
"mangle-tree",
/* stdio_fds= */ NULL,
(int[]) { userns_fd, tree_fd }, 2,
@@ -401,7 +401,7 @@ int import_copy_foreign(
if (r < 0)
return r;
r = safe_fork_full(
r = pidref_safe_fork_full(
"copy-tree",
/* stdio_fds= */ NULL,
(int[]) { *userns_fd, source_fd, target_fd }, 3,
@@ -459,7 +459,7 @@ int import_remove_tree_foreign(const char *path, int *userns_fd) {
if (r < 0)
return r;
r = safe_fork_full(
r = pidref_safe_fork_full(
"rm-tree",
/* stdio_fds= */ NULL,
(int[]) { *userns_fd, tree_fd }, 2,