\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.}
-\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,
the process (which terminates by the moment the function returns) and will be
$-1$ if the process couldn't be started and typically 0 if the process
terminated successfully. Also, while waiting for the process to
-terminate, wxExecute will call \helpref{wxYield}{wxyield}. The caller
-should ensure that this can cause no recursion, in the simplest case by
-calling \helpref{wxEnableTopLevelWindows(false)}{wxenabletoplevelwindows}.
+terminate, wxExecute will call \helpref{wxYield}{wxyield}. Because of this, by
+default this function disables all application windows to avoid unexpected
+reentrancies which could result from the users interaction with the program
+while the child process is running. If you are sure that it is safe to not
+disable the program windows, you may pass \texttt{wxEXEC\_NODISABLE} flag to
+prevent this automatic disabling from happening.
For asynchronous execution, however, the return value is the process id and
zero value indicates that the command could not be executed. As an added
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