} while ( true );
}
- if ( pid > 0 ) // bsc#1109877: must re-check! running() in the loop above may have already waited.
+ // Wait for child to exit
+ int ret;
+ int status = 0;
+ do
{
- // Wait for child to exit
- int ret;
- int status = 0;
- do
- {
- ret = waitpid(pid, &status, 0);
- }
- while (ret == -1 && errno == EINTR);
+ ret = waitpid(pid, &status, 0);
+ }
+ while (ret == -1 && errno == EINTR);
- if (ret != -1)
- {
- _exitStatus = checkStatus( status );
- }
- pid = -1;
+ if (ret != -1)
+ {
+ _exitStatus = checkStatus( status );
}
+ pid = -1;
}
return _exitStatus;
//
//////////////////////////////////////////////////////////////////////
- namespace _ExternalProgram
+ namespace externalprogram
{
EarlyPipe::EarlyPipe()
{
if ( _stderr )
::fclose( _stderr );
}
- }
+ } // namespace externalprogram
bool ExternalProgramWithStderr::stderrGetUpTo( std::string & retval_r, const char delim_r, bool returnDelim_r )
{