about summary refs log tree commit diff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/support_wait_for_thread_exit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/support/support_wait_for_thread_exit.c b/support/support_wait_for_thread_exit.c
index 658a813810..5e3be421a7 100644
--- a/support/support_wait_for_thread_exit.c
+++ b/support/support_wait_for_thread_exit.c
@@ -43,7 +43,10 @@ support_wait_for_thread_exit (void)
           return;
         }
 
-      if (strcmp (e->d_name, ".") == 0 || strcmp (e->d_name, "..") == 0)
+      /* In some kernels, "0" entries denote a thread that has just
+         exited.  */
+      if (strcmp (e->d_name, ".") == 0 || strcmp (e->d_name, "..") == 0
+          || strcmp (e->d_name, "0") == 0)
         continue;
 
       int task_tid = atoi (e->d_name);