This should fix the windows build for real.

This commit is contained in:
Martín Lucas Golini
2022-07-07 23:25:18 -03:00
parent b91fed9658
commit 850cc6ae21
2 changed files with 12 additions and 8 deletions

View File

@@ -192,10 +192,12 @@ void FormatterPlugin::runFormatter( UICodeEditor* editor, const Formatter& forma
data += buffer.substr( 0, bytesRead );
} while ( bytesRead != 0 && subprocess_alive( &subprocess ) && !mShuttingDown );
if ( subprocess_alive( &subprocess ) && !mShuttingDown )
subprocess_join( &subprocess, &returnCode );
else
returnCode = subprocess.return_status;
if ( mShuttingDown ) {
subprocess_terminate( &subprocess );
return;
}
subprocess_join( &subprocess, &returnCode );
subprocess_destroy( &subprocess );
// Log::info( "Formatter result:\n%s", data.c_str() );

View File

@@ -271,10 +271,12 @@ void LinterPlugin::runLinter( std::shared_ptr<TextDocument> doc, const Linter& l
data += buffer.substr( 0, bytesRead );
} while ( bytesRead != 0 && subprocess_alive( &subprocess ) && !mShuttingDown );
if ( subprocess_alive( &subprocess ) && !mShuttingDown )
subprocess_join( &subprocess, &returnCode );
else
returnCode = subprocess.return_status;
if ( mShuttingDown ) {
subprocess_terminate( &subprocess );
return;
}
subprocess_join( &subprocess, &returnCode );
subprocess_destroy( &subprocess );
if ( linter.hasNoErrorsExitCode && linter.noErrorsExitCode == returnCode ) {