1
0
Fork 0

Merging upstream version 0.9~rc2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 05:07:04 +01:00
parent 5a7d30d9fd
commit 634a6bfc0f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
21 changed files with 133 additions and 71 deletions

View file

@ -305,7 +305,8 @@ bool test_format( const int infd, std::string & file_type,
}
int wait_for_child( const pid_t pid, const char * const name )
int wait_for_child( const pid_t pid, const char * const name,
const int eretval )
{
int status;
while( waitpid( pid, &status, 0 ) == -1 )
@ -315,10 +316,10 @@ int wait_for_child( const pid_t pid, const char * const name )
if( verbosity >= 0 )
std::fprintf( stderr, "%s: Error waiting termination of `%s': %s.\n",
util_name, name, std::strerror( errno ) );
_exit( 1 );
_exit( eretval );
}
}
if( WIFEXITED( status ) ) return WEXITSTATUS( status );
else return 1;
return eretval;
}