Maybe someone wants to fix the wxExecute implementation?
In the Unix wxExecute implementation I can read:
#if wxUSE_THREADS
// fork() doesn't mix well with POSIX threads: on many systems the program
// deadlocks or crashes for some reason. Probably our code is buggy and
// doesn't do something which must be done to allow this to work, but I
// don't know what yet, so for now just warn the user (this is the least we
// can do) about it
wxASSERT_MSG( wxThread::IsMain(),
_T("wxExecute() can be called only from the main thread") );
#endif // wxUSE_THREADS
And in the Windows wxExecute implementation I can read:
#if wxUSE_THREADS
// for many reasons, the code below breaks down if it's called from another
// thread -- this could be fixed, but as Unix versions don't support this
// neither I don't want to waste time on this now
wxASSERT_MSG( wxThread::IsMain(),
_T("wxExecute() can be called only from the main thread") );
#endif // wxUSE_THREADS
Aside, popen:
// this function replaces the standard popen() one: it launches a process
// asynchronously and allows the caller to get the streams connected to its
// std{in|out|err}
//
// on error NULL is returned, in any case the process object will be
// deleted automatically when the process terminates and should *not* be
// deleted by the caller
static wxProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC);
JThedering: if you could fix the above wxExecute implementations, I'm sure the wxWidgets team would greatly appreciate it. :)