local-tst-eintr1-eagain
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
committerSamuel Thibault <sthibault@debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +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 4647cdb6d303d7d42d624da9cf64885af9ac8c44..e771d01e5d334d283083b39d053a099d42e959eb 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",