// Use polling instead of Mach ports, which doesn't work on Intel
// due to task_for_pid security issues.
+// http://developer.apple.com/technotes/tn/tn2050.html
+
// What's a better test for Intel vs PPC?
#ifdef WORDS_BIGENDIAN
#define USE_POLLING 0
#if USE_POLLING
+#if wxUSE_THREADS
class wxProcessTerminationEventHandler: public wxEvtHandler
{
public:
{
usleep(100);
int status = 0;
- int rc = waitpid(abs(m_data->pid), & status, WNOHANG);
+ int rc = waitpid(abs(m_data->pid), & status, 0);
if (rc != 0)
{
if ((rc != -1) && WIFEXITED(status))
return 0;
}
+#else // !wxUSE_THREADS
+int wxAddProcessCallbackForPid(wxEndProcessData*, int)
+{
+ wxLogDebug(wxT("Could not create termination detection thread."));
+ return -1;
+}
+#endif // wxUSE_THREADS/!wxUSE_THREADS
#else // !USE_POLLING
// put it in because it's already compiled for wxCocoa and wxMac GUI lib.
#if wxUSE_GUI
+#if wxUSE_STDPATHS
static wxStandardPathsCF gs_stdPaths;
wxStandardPathsBase& wxGUIAppTraits::GetStandardPaths()
{
return gs_stdPaths;
}
+#endif
#endif // wxUSE_GUI