File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3971,7 +3971,7 @@ expect_success_from_sync_socket (int sync_fd, libcrun_error_t *err)
39713971
39723972 ret = TEMP_FAILURE_RETRY (read (sync_fd , & res , sizeof (res )));
39733973 if (UNLIKELY (ret != sizeof (res )))
3974- return crun_make_error (err , errno , "read status from sync socket" );
3974+ return crun_make_error (err , ret < 0 ? errno : 0 , "read status from sync socket" );
39753975
39763976 if (res == 0 )
39773977 return 0 ;
@@ -5173,7 +5173,7 @@ libcrun_run_linux_container (libcrun_container_t *container, container_entrypoin
51735173
51745174 ret = TEMP_FAILURE_RETRY (read (sync_socket_host , & new_pid , sizeof (new_pid )));
51755175 if (UNLIKELY (ret != sizeof (new_pid )))
5176- return crun_make_error (err , errno , "read pid from sync socket" );
5176+ return crun_make_error (err , ret < 0 ? errno : 0 , "read pid from sync socket" );
51775177
51785178 /* Cleanup the first process. */
51795179 ret = waitpid_ignore_stopped (pid , NULL , 0 );
You can’t perform that action at this time.
0 commit comments