]> git.saurik.com Git - wxWidgets.git/commitdiff
Assert that wxEXEC_SYNC is not passed in flags to wxProcess::Open
authorRobin Dunn <robin@alldunn.com>
Mon, 15 Jul 2002 17:10:26 +0000 (17:10 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 15 Jul 2002 17:10:26 +0000 (17:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/process.tex
src/common/process.cpp

index d79ce9bcbfec889cc2c8e33e8f204178ce7b9630..0917a04680ab4dce359ad75458e914c49967fac6 100644 (file)
@@ -212,7 +212,8 @@ exits to avoid memory leaks.
 \wxheading{Parameters}
 
 \docparam{cmd}{The command to execute, including optional arguments.}
-\docparam{flags}{The flags to pass to \helpref{wxExecute}{wxexecute}.}
+\docparam{flags}{The flags to pass to \helpref{wxExecute}{wxexecute}.
+  NOTE: wxEXEC_SYNC should not be used.}
 
 \wxheading{Return value}
 
index ccd0cc589bd330735f173fdf69300cd508af66c5..7c23c4762076117016c77d6cfdeefef5097bdd95 100644 (file)
@@ -65,6 +65,7 @@ void wxProcess::Init(wxEvtHandler *parent, int id, int flags)
 /* static */
 wxProcess *wxProcess::Open(const wxString& cmd, int flags)
 {
+    wxASSERT_MSG( !(flags & wxEXEC_SYNC), wxT("wxEXEC_SYNC should not be used." ));
     wxProcess *process = new wxProcess(wxPROCESS_REDIRECT);
     if ( !wxExecute(cmd, flags, process) )
     {