process-util: introduce new FORK_FREEZE flag for safe_fork()

Often we want to fork off a process that just hangs until we kill it,
let's add a simple flag to create one of this type, and use it at
various places.
This commit is contained in:
Lennart Poettering
2025-01-16 11:55:21 +01:00
parent 8110b34b64
commit 6eeeef9f66
4 changed files with 14 additions and 32 deletions
+3
View File
@@ -1763,6 +1763,9 @@ int safe_fork_full(
}
}
if (FLAGS_SET(flags, FORK_FREEZE))
freeze();
if (ret_pid)
*ret_pid = getpid_cached();