mirror of
https://github.com/systemd/systemd
synced 2024-07-01 07:34:28 +00:00
core: use write() to send handoff timestamp
Before12001b1bf0
, 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 (5686391b00
). Partially fixes a regression caused by12001b1bf0
. Partially fixes #33299.
This commit is contained in:
parent
b89a262eb5
commit
5161422bb5
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user