core/service: only pass socket fds to control processes

If socket is used as stdio, we'd currently imply EXEC_PASS_FDS
and dump the whole set of fds to the control processes. This is
pretty much unexpected and unnecessary though, instead let's
pass only the socket fds.

Yes, this is a compat break, but a relatively minor one I'd
argue. And we can always revisit things if users do complain.
This commit is contained in:
Mike Yuan
2025-10-30 17:47:29 +01:00
parent d85d98f406
commit c954830fa9
3 changed files with 19 additions and 12 deletions
+1 -1
View File
@@ -486,8 +486,8 @@ int exec_spawn(
assert(command);
assert(context);
assert(params);
assert(!params->fds || FLAGS_SET(params->flags, EXEC_PASS_FDS));
assert(params->fds || (params->n_socket_fds + params->n_stashed_fds == 0 && !params->fd_names));
assert(params->n_stashed_fds == 0 || FLAGS_SET(params->flags, EXEC_PASS_FDS));
assert(!params->files_env); /* We fill this field, ensure it comes NULL-initialized to us */
assert(ret);