From e8468541727db9cea18cf29c39f46013bce1bae3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jul 2024 14:40:47 +0200 Subject: execute: add FIXME comment As requested by @YHNdnzj: https://github.com/systemd/systemd/pull/33707#discussion_r1684055699 --- src/core/exec-invoke.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index ea85c36581..8c7e29f17a 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -497,6 +497,9 @@ static int setup_output( i = fixup_input(context, socket_fd, params->flags & EXEC_APPLY_TTY_STDIN); o = fixup_output(context->std_output, socket_fd); + // FIXME: we probably should spend some time here to verify that if we inherit an fd from stdin + // (possibly indirect via inheritance from stdout) it is actually opened for write! + if (fileno == STDERR_FILENO) { ExecOutput e; e = fixup_output(context->std_error, socket_fd); -- cgit v1.2.3