+/* 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);
+ long pid = wxExecute(cmd, flags, process);
+ if( !pid )
+ {
+ // couldn't launch the process
+ delete process;
+ return NULL;
+ }
+
+ process->SetPid(pid);
+
+ return process;
+}
+