]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: use FORK_LOG to get more precise logging
authorMichal Sekletar <msekleta@redhat.com>
Mon, 9 Sep 2024 16:28:13 +0000 (18:28 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 30 Oct 2024 12:20:40 +0000 (12:20 +0000)
src/coredump/coredump.c

index 70403e1221d1d92f70c4df5ec9a3d2169ba22241..0900689d04275c1f530b23f39d5d03c2c956465b 100644 (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]);