Message ID | 20230102100938.2778311-2-samuel.thibault@ens-lyon.org |
---|---|
State | New |
Headers | show |
Series | hurd: fixes | expand |
diff --git a/htl/pt-create.c b/htl/pt-create.c index 5d37edbbff..d3847b69ea 100644 --- a/htl/pt-create.c +++ b/htl/pt-create.c @@ -136,8 +136,8 @@ __pthread_create_internal (struct __pthread **thread, if (stacksize == 0) { struct rlimit rlim; - __getrlimit (RLIMIT_STACK, &rlim); - if (rlim.rlim_cur != RLIM_INFINITY) + err = __getrlimit (RLIMIT_STACK, &rlim); + if (err == 0 && rlim.rlim_cur != RLIM_INFINITY) stacksize = rlim.rlim_cur; if (stacksize == 0) stacksize = PTHREAD_STACK_DEFAULT;