public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] htl: Check error returned by __getrlimit Date: Mon, 2 Jan 2023 10:36:16 +0000 (GMT) [thread overview] Message-ID: <20230102103616.4191C3858D32@sourceware.org> (raw) 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;
reply other threads:[~2023-01-02 10:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230102103616.4191C3858D32@sourceware.org \ --to=sthibaul@sourceware.org \ --cc=glibc-cvs@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: linkBe 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).