fixed IO redirection to work in wxExecute() in console applications (including the case when the child process outputs more than pipe buffer size) by using wxSelectDispatcher for multiplexing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,9 +40,22 @@ struct wxExecuteData
|
||||
#if wxUSE_STREAMS
|
||||
bufOut =
|
||||
bufErr = NULL;
|
||||
|
||||
fdOut =
|
||||
fdErr = wxPipe::INVALID_FD;
|
||||
#endif // wxUSE_STREAMS
|
||||
}
|
||||
|
||||
// get the FD corresponding to the read end of the process end detection
|
||||
// pipe and close the write one
|
||||
int GetEndProcReadFD()
|
||||
{
|
||||
const int fd = pipeEndProcDetect.Detach(wxPipe::Read);
|
||||
pipeEndProcDetect.Close();
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
// wxExecute() flags
|
||||
int flags;
|
||||
|
||||
@@ -60,6 +73,10 @@ struct wxExecuteData
|
||||
// called bufOut and not bufIn
|
||||
wxStreamTempInputBuffer *bufOut,
|
||||
*bufErr;
|
||||
|
||||
// the corresponding FDs, -1 if not redirected
|
||||
int fdOut,
|
||||
fdErr;
|
||||
#endif // wxUSE_STREAMS
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user