coredump: use FORK_LOG to get more precise logging

This commit is contained in:
Michal Sekletar
2024-10-30 12:20:40 +00:00
committed by Luca Boccassi
parent a88e72be2c
commit e5bad3a7b9
+2 -2
View File
@@ -1679,7 +1679,7 @@ static int gather_pid_mount_tree_fd(const Context *context) {
"(sd-mount-tree)",
/* except_fds= */ NULL,
/* n_except_fds= */ 0,
FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGKILL,
FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGKILL|FORK_LOG,
/* pidns_fd= */ -EBADF,
mntns_fd,
/* netns_fd= */ -EBADF,
@@ -1687,7 +1687,7 @@ static int gather_pid_mount_tree_fd(const Context *context) {
root_fd,
&child);
if (r < 0)
return log_error_errno(r, "Failed to fork(): %m");
return r;
if (r == 0) {
pair[0] = safe_close(pair[0]);