-    const int flags = execData.flags;
-    if ( !(flags & wxEXEC_SYNC) || (flags & wxEXEC_NOEVENTS) )
-    {
-        // async or blocking sync cases are already handled by the base class
-        // just fine, no need to duplicate its code here
-        return wxAppTraits::WaitForChild(execData);
-    }
-
-    // here we're dealing with the case of synchronous execution when we want
-    // to process the GUI events while waiting for the child termination
-
-    wxEndProcessData endProcData;
-
-    // we may have process for capturing the program output, but it's
-    // not used in wxEndProcessData in the case of sync execution
-    endProcData.process = NULL;
-
-    // sync execution: indicate it by negating the pid
-    endProcData.pid = -execData.pid;
-
-    endProcData.tag = AddProcessCallback
-                      (
-                         &endProcData,
-                         execData.pipeEndProcDetect.Detach(wxPipe::Read)
-                      );
-
-    execData.pipeEndProcDetect.Close();
-
-