From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>, commit-hurd@gnu.org
Subject: [hurd,commited 1/7] htl: Check error returned by __getrlimit
Date: Mon, 2 Jan 2023 11:09:32 +0100 [thread overview]
Message-ID: <20230102100938.2778311-2-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20230102100938.2778311-1-samuel.thibault@ens-lyon.org>
---
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;
--
2.39.0
next prev parent reply other threads:[~2023-01-02 10:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 10:09 [hurd,commited 0/7] hurd: fixes Samuel Thibault
2023-01-02 10:09 ` Samuel Thibault [this message]
2023-01-02 10:09 ` [hurd,commited 2/7] hurd _S_msg_add_auth: Initialize new arrays to 0 Samuel Thibault
2023-01-02 10:09 ` [hurd,commited 3/7] hurd hurdstartup: Initialize remaining fields of hurd_startup_data Samuel Thibault
2023-01-02 10:09 ` [hurd,commited 4/7] htl: Drop duplicate check in __pthread_stack_alloc Samuel Thibault
2023-01-02 10:09 ` [hurd,commited 5/7] hurd: Make dl-sysdep __sbrk check __vm_allocate call Samuel Thibault
2023-01-02 10:09 ` [hurd,commited 6/7] hurd fcntl: Make LOCKED macro more robust Samuel Thibault
2023-01-02 10:09 ` [hurd,commited 7/7] hurd getcwd: Fix memory leak on error Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230102100938.2778311-2-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=commit-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).