Package: glibc / 2.24-11+deb9u4

any/local-tst-eintr1-eagain.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2012-06-06  Jonathan Nieder  <jrnieder@gmail.com>

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

---

--- a/nptl/tst-eintr1.c
+++ b/nptl/tst-eintr1.c
@@ -49,6 +49,16 @@
 	      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",