summaryrefslogtreecommitdiffstats
path: root/lib/libc_r
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-06-04 08:16:32 +0000
committermtm <mtm@FreeBSD.org>2003-06-04 08:16:32 +0000
commit96c48e263583f7057ab5d63d6935d08098e68e2b (patch)
treef0bb24764e380fdc42f65b80a0de44497297ba40 /lib/libc_r
parent1c0932407b0f45ce360569f80d08c31857bfca85 (diff)
downloadFreeBSD-src-96c48e263583f7057ab5d63d6935d08098e68e2b.zip
FreeBSD-src-96c48e263583f7057ab5d63d6935d08098e68e2b.tar.gz
If the library is not able to create a thread because resources
don't allow it at the moment, the correct thing to do is try again. Otherwise, libthr would fail this test because it doesn't allow an unlimited number of concurrent threads per application.
Diffstat (limited to 'lib/libc_r')
-rw-r--r--lib/libc_r/test/join_leak_d.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc_r/test/join_leak_d.c b/lib/libc_r/test/join_leak_d.c
index 6532ca5..9a35140 100644
--- a/lib/libc_r/test/join_leak_d.c
+++ b/lib/libc_r/test/join_leak_d.c
@@ -65,6 +65,10 @@ main(void)
for (i = 0; i < NITERATIONS; i++) {
if ((error = pthread_create(&thread, NULL, thread_entry, NULL))
!= 0) {
+ if (error == EAGAIN) {
+ i--;
+ continue;
+ }
fprintf(stderr, "Error in pthread_create(): %s\n",
strerror(error));
exit(1);
OpenPOWER on IntegriCloud