public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: Check error returned by __getrlimit
@ 2023-01-02 10:36 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-01-02 10:36 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3a614f39e61140dd2478ce5b7564ec8a53269ea4
commit 3a614f39e61140dd2478ce5b7564ec8a53269ea4
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon Jan 2 01:01:28 2023 +0100
htl: Check error returned by __getrlimit
Diff:
---
htl/pt-create.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-02 10:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 10:36 [glibc] htl: Check error returned by __getrlimit Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).