if it's a separate thread, it's allowed to hang (perf issue reported by BOINC)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,6 +26,8 @@
|
|||||||
// Use polling instead of Mach ports, which doesn't work on Intel
|
// Use polling instead of Mach ports, which doesn't work on Intel
|
||||||
// due to task_for_pid security issues.
|
// due to task_for_pid security issues.
|
||||||
|
|
||||||
|
// http://developer.apple.com/technotes/tn/tn2050.html
|
||||||
|
|
||||||
// What's a better test for Intel vs PPC?
|
// What's a better test for Intel vs PPC?
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define USE_POLLING 0
|
#define USE_POLLING 0
|
||||||
@@ -80,7 +82,7 @@ void* wxProcessTerminationThread::Entry()
|
|||||||
{
|
{
|
||||||
usleep(100);
|
usleep(100);
|
||||||
int status = 0;
|
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 != 0)
|
||||||
{
|
{
|
||||||
if ((rc != -1) && WIFEXITED(status))
|
if ((rc != -1) && WIFEXITED(status))
|
||||||
|
Reference in New Issue
Block a user