From 5161422bb5b0cc47100163ea690252c90159b354 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 23 Jun 2024 15:15:30 +0900 Subject: [PATCH] core: use write() to send handoff timestamp Before 12001b1bf067339db089d52e08fd0b4c6a9945df, the timestamp is sent with write(), but the commit made the timestamp sent by send(), and causes regressin #33299. Note the invocation will still fail if write() is filtered by seccomp. But, that is an old issue since Type=exec is introduced (5686391b006ee82d8a4559067ad9818e3e631247). Partially fixes a regression caused by 12001b1bf067339db089d52e08fd0b4c6a9945df. Partially fixes #33299. --- src/core/exec-invoke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index ec5684d1a57..78a05f873e2 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -4013,7 +4013,7 @@ static int send_handoff_timestamp( dual_timestamp dt; dual_timestamp_now(&dt); - if (send(p->handoff_timestamp_fd, (const usec_t[2]) { dt.realtime, dt.monotonic }, sizeof(usec_t) * 2, 0) < 0) { + if (write(p->handoff_timestamp_fd, (const usec_t[2]) { dt.realtime, dt.monotonic }, sizeof(usec_t) * 2) < 0) { if (reterr_exit_status) *reterr_exit_status = EXIT_EXEC; return log_exec_error_errno(c, p, errno, "Failed to send handoff timestamp: %m");