wxExecute may only be called from the main thread

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-02-27 12:18:07 +00:00
parent 9e023db73b
commit 647b8e379e
3 changed files with 25 additions and 2 deletions

View File

@@ -203,6 +203,16 @@ long wxExecute( const wxString& command, int flags, wxProcess *process )
{
wxCHECK_MSG( !command.IsEmpty(), 0, wxT("can't exec empty command") );
#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
int argc = 0;
wxChar *argv[WXEXECUTE_NARGS];
wxString argument;