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:
@@ -1763,6 +1763,9 @@ int safe_fork_full(
|
||||
}
|
||||
}
|
||||
|
||||
if (FLAGS_SET(flags, FORK_FREEZE))
|
||||
freeze();
|
||||
|
||||
if (ret_pid)
|
||||
*ret_pid = getpid_cached();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user