Don't ignore child process output if it exits with -1 exit code.
While this code is used by us if the program couldn't be launched at all, it doesn't mean that it didn't run as -1 could also be returned by the child process to indicate an error after outputting something, so we should still read its output in this case. Closes #15205. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -962,11 +962,8 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event))
|
||||
wxLogStatus("Command \"%s\" terminated after %ldms; exit code %d.",
|
||||
cmd, sw.Time(), code);
|
||||
|
||||
if ( code != -1 )
|
||||
{
|
||||
ShowOutput(cmd, output, wxT("Output"));
|
||||
ShowOutput(cmd, errors, wxT("Errors"));
|
||||
}
|
||||
ShowOutput(cmd, output, wxT("Output"));
|
||||
ShowOutput(cmd, errors, wxT("Errors"));
|
||||
}
|
||||
else // async exec
|
||||
{
|
||||
|
Reference in New Issue
Block a user