@@ -3372,7 +3372,7 @@ libcrun_container_start (libcrun_context_t *context, const char *id, libcrun_err
33723372
33733373 ret = select (fd + 1 , & read_set , NULL , NULL , & timeout );
33743374 if (UNLIKELY (ret < 0 ))
3375- return ret ;
3375+ return crun_make_error ( err , errno , "select failed" ) ;
33763376 if (ret )
33773377 {
33783378 ret = handle_notify_socket (fd , err );
@@ -4466,16 +4466,21 @@ libcrun_container_get_features (libcrun_context_t *context, struct features_info
44664466int
44674467libcrun_container_spec (bool root , FILE * out , libcrun_error_t * err )
44684468{
4469+ int ret ;
44694470 int cgroup_mode ;
44704471
44714472 cgroup_mode = libcrun_get_cgroup_mode (err );
44724473 if (UNLIKELY (cgroup_mode < 0 ))
44734474 return cgroup_mode ;
44744475
4475- return fprintf (out , spec_file ,
4476- root ? spec_pts_tty_group : "\n" ,
4477- root ? "" : spec_user ,
4478- cgroup_mode == CGROUP_MODE_UNIFIED ? spec_cgroupns : "" );
4476+ ret = fprintf (out , spec_file ,
4477+ root ? spec_pts_tty_group : "\n" ,
4478+ root ? "" : spec_user ,
4479+ cgroup_mode == CGROUP_MODE_UNIFIED ? spec_cgroupns : "" );
4480+ if (UNLIKELY (ret < 0 ))
4481+ return crun_make_error (err , errno , "fprintf failed" );
4482+
4483+ return ret ;
44794484}
44804485
44814486int
@@ -4562,7 +4567,7 @@ restore_proxy_process (int *proxy_pid_pipe, int cgroup_manager, libcrun_error_t
45624567
45634568 ret = TEMP_FAILURE_RETRY (read (* proxy_pid_pipe , & new_pid , sizeof (new_pid )));
45644569 if (UNLIKELY (ret < 0 ))
4565- return ret ;
4570+ return crun_make_error ( err , errno , "read failed" ) ;
45664571
45674572 close_and_reset (proxy_pid_pipe );
45684573
0 commit comments