local-tst-eintr1-eagain
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
2012-06-06  Jonathan Nieder  <jrnieder@gmail.com>

* nptl/tst-eintr1.c (tf1): Tolerate EAGAIN from pthread_create.

Gbp-Pq: Topic any
Gbp-Pq: Name local-tst-eintr1-eagain.diff

nptl/tst-eintr1.c

index 761f8901d8efaee3625cd4df487eddc12cc7b793..a6d13d7bb78c149f23e76edba1a100e954cf16e8 100644 (file)
@@ -53,6 +53,16 @@ tf1 (void *arg)
              puts ("pthread_create returned EINTR");
              exit (1);
            }
+         if (e == EAGAIN)
+           {
+             /* The kernel might not have processed the last few
+                pthread_join()s yet.  Tolerate that, but record the
+                event in test output so attentive people reading
+                logs can notice if pthread_join() stops working
+                altogether.  */
+             write (STDOUT_FILENO, "!", 1);
+             continue;
+           }
 
          char buf[100];
          printf ("tf1: pthread_create failed: %s\n",