Skip to content

Commit

Permalink
container: fix error after read
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Sjölund <[email protected]>
  • Loading branch information
eriksjolund committed Jan 30, 2025
1 parent 801d6e8 commit 7ab1acd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libcrun/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ sync_socket_wait_sync (libcrun_context_t *context, int fd, bool flush, libcrun_e
{
int ret;

errno = 0;
ret = TEMP_FAILURE_RETRY (read (fd, &msg, sizeof (msg)));
if (UNLIKELY (ret < 0))
{
Expand All @@ -486,7 +485,7 @@ sync_socket_wait_sync (libcrun_context_t *context, int fd, bool flush, libcrun_e
if (flush)
return 0;

return crun_make_error (err, errno, "read from the init process");
return crun_make_error (err, 0, "read from the init process");
}

if (! flush && msg.type == SYNC_SOCKET_SYNC_MESSAGE)
Expand Down

0 comments on commit 7ab1acd

Please sign in to comment.