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:
committed by
DaanDeMeyer
parent
e6703a9aa4
commit
52ecf376fa
@@ -513,7 +513,10 @@ static int netns_fork_and_wait(int netns_fd, int *ret_original_netns_fd) {
|
||||
|
||||
assert(netns_fd >= 0);
|
||||
|
||||
r = safe_fork("(sd-netns)", FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGTERM|FORK_WAIT|FORK_LOG|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL);
|
||||
r = pidref_safe_fork(
|
||||
"(sd-netns)",
|
||||
FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGTERM|FORK_WAIT|FORK_LOG|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE,
|
||||
/* ret= */ NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to fork process (sd-netns): %m");
|
||||
if (r == 0) {
|
||||
|
||||
Reference in New Issue
Block a user