git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40620
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/thread.h"
#include "wx/process.h"
#include "wx/thread.h"
#include "wx/process.h"
// Use polling instead of Mach ports, which doesn't work on Intel
// due to task_for_pid security issues.
// Use polling instead of Mach ports, which doesn't work on Intel
// due to task_for_pid security issues.
#include <CoreFoundation/CFMachPort.h>
#include <CoreFoundation/CFMachPort.h>
extern "C" {
#include <mach/mach.h>
}
extern "C" {
#include <mach/mach.h>
}
int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
if(!rc)
{
int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
if(!rc)
{
- wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
- return;
+ wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
+ return;
}
if((rc != -1) && WIFEXITED(status))
}
if((rc != -1) && WIFEXITED(status))
- proc_data->exitcode = WEXITSTATUS(status);
+ proc_data->exitcode = WEXITSTATUS(status);
- proc_data->exitcode = -1;
+ proc_data->exitcode = -1;
wxHandleProcessTermination(proc_data);
}
wxHandleProcessTermination(proc_data);
}
+#endif // USE_POLLING/!USE_POLLING
// NOTE: This doesn't really belong here but this was a handy file to
// put it in because it's already compiled for wxCocoa and wxMac GUI lib.
// NOTE: This doesn't really belong here but this was a handy file to
// put it in because it's already compiled for wxCocoa and wxMac GUI lib.