summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f38f689)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31082
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteArgs}}
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteArgs}}
-\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}}
+\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{int }{flags = 0}}
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdout} and it
only takes the {\tt command} argument,
and returns a 2-element list {\tt ( status, output )}, where {\tt output} is
an array reference.}
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdout} and it
only takes the {\tt command} argument,
and returns a 2-element list {\tt ( status, output )}, where {\tt output} is
an array reference.}
-\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{wxArrayString\& }{errors}}
+\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{wxArrayString\& }{errors}, \param{int }{flags = 0}}
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdoutStderr}
and it only takes the {\tt command} argument,
\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdoutStderr}
and it only takes the {\tt command} argument,
started their own session).
Finally, you may use the third overloaded version of this function to execute
started their own session).
Finally, you may use the third overloaded version of this function to execute
-a process (always synchronously) and capture its output in the array
-{\it output}. The fourth version adds the possibility to additionally capture
-the messages from standard error output in the {\it errors} array.
+a process (always synchronously, the contents of \arg{flags} is or'd with
+\textt{wxEXEC\_SYNC}) and capture its output in the array \arg{output}. The
+fourth version adds the possibility to additionally capture the messages from
+standard error output in the \arg{errors} array.
{\bf NB:} Currently wxExecute() can only be used from the main thread, calling
this function from another thread will result in an assert failure in debug
{\bf NB:} Currently wxExecute() can only be used from the main thread, calling
this function from another thread will result in an assert failure in debug
// execute the command capturing its output into an array line by line, this is
// always synchronous
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
// execute the command capturing its output into an array line by line, this is
// always synchronous
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
- wxArrayString& output);
+ wxArrayString& output,
+ int flags = 0);
// also capture stderr (also synchronous)
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
// also capture stderr (also synchronous)
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
- wxArrayString& output,
- wxArrayString& error);
+ wxArrayString& output,
+ wxArrayString& error,
+ int flags = 0);
// public versions of wxExecute() below
static long wxDoExecuteWithCapture(const wxString& command,
wxArrayString& output,
// public versions of wxExecute() below
static long wxDoExecuteWithCapture(const wxString& command,
wxArrayString& output,
+ wxArrayString* error,
+ int flags)
{
// create a wxProcess which will capture the output
wxProcess *process = new wxProcess;
process->Redirect();
{
// create a wxProcess which will capture the output
wxProcess *process = new wxProcess;
process->Redirect();
- long rc = wxExecute(command, wxEXEC_SYNC, process);
+ long rc = wxExecute(command, wxEXEC_SYNC | flags, process);
#if wxUSE_STREAMS
if ( rc != -1 )
#if wxUSE_STREAMS
if ( rc != -1 )
-long wxExecute(const wxString& command, wxArrayString& output)
+long wxExecute(const wxString& command, wxArrayString& output, int flags)
- return wxDoExecuteWithCapture(command, output, NULL);
+ return wxDoExecuteWithCapture(command, output, NULL, flags);
}
long wxExecute(const wxString& command,
wxArrayString& output,
}
long wxExecute(const wxString& command,
wxArrayString& output,
+ wxArrayString& error,
+ int flags)
- return wxDoExecuteWithCapture(command, output, &error);
+ return wxDoExecuteWithCapture(command, output, &error, flags);
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------