Skip to content

Commit

Permalink
linux: simplify error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jul 28, 2023
1 parent 164c55e commit f53a212
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/libcrun/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -4695,17 +4695,7 @@ libcrun_run_linux_container (libcrun_container_t *container, container_entrypoin
/* Initialize the new process and make sure to join/create all the required namespaces. */
ret = init_container (container, sync_socket_container, &init_status, err);
if (UNLIKELY (ret < 0))
{
ret = TEMP_FAILURE_RETRY (write (sync_socket_container, &failure, 1));
if (UNLIKELY (ret < 0))
goto localfail;

send_error_to_sync_socket_and_die (sync_socket_container, false, err);

localfail:
libcrun_fail_with_error ((*err)->status, "%s", (*err)->msg);
_exit (EXIT_FAILURE);
}
send_error_to_sync_socket_and_die (sync_socket_container, false, err);
else
{
ret = send_success_to_sync_socket (sync_socket_container, err);
Expand Down

0 comments on commit f53a212

Please sign in to comment.