if (fd < 0)
continue;
- /* This is special and relies on close-on-exec semantics, make sure it's
- * there */
- r = fd_cloexec(fd, true);
- if (r < 0)
- return r;
-
p->exec_fd = fd;
} else if ((val = startswith(l, "exec-parameters-bpf-outer-map-fd="))) {
int fd;
if (fd < 0)
continue;
- /* This is special and relies on close-on-exec semantics, make sure it's
- * there */
- r = fd_cloexec(fd, true);
- if (r < 0)
- return r;
-
p->bpf_outer_map_fd = fd;
} else if ((val = startswith(l, "exec-parameters-notify-socket="))) {
r = free_and_strdup(&p->notify_socket, val);
log_set_prohibit_ipc(false);
log_open();
- /* The serialization fd is set to CLOEXEC in parse_argv, so it's also filtered. */
+ /* This call would collect all passed fds and enable CLOEXEC. We'll unset it in exec_invoke (flag_fds)
+ * for fds that shall be passed to the child.
+ * The serialization fd is set to CLOEXEC in parse_argv, so it's also filtered. */
r = fdset_new_fill(/* filter_cloexec= */ 0, &fdset);
if (r < 0)
return log_error_errno(r, "Failed to create fd set: %m");