[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd,commited 1/7] htl: Check error returned by __getrlimit
From: |
Samuel Thibault |
Subject: |
[hurd,commited 1/7] htl: Check error returned by __getrlimit |
Date: |
Mon, 2 Jan 2023 11:09:32 +0100 |
---
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
- [hurd,commited 0/7] hurd: fixes, Samuel Thibault, 2023/01/02
- [hurd,commited 1/7] htl: Check error returned by __getrlimit,
Samuel Thibault <=
- [hurd,commited 2/7] hurd _S_msg_add_auth: Initialize new arrays to 0, Samuel Thibault, 2023/01/02
- [hurd, commited 4/7] htl: Drop duplicate check in __pthread_stack_alloc, Samuel Thibault, 2023/01/02
- [hurd, commited 5/7] hurd: Make dl-sysdep __sbrk check __vm_allocate call, Samuel Thibault, 2023/01/02
- [hurd,commited 6/7] hurd fcntl: Make LOCKED macro more robust, Samuel Thibault, 2023/01/02
- [hurd, commited 3/7] hurd hurdstartup: Initialize remaining fields of hurd_startup_data, Samuel Thibault, 2023/01/02
- [hurd,commited 7/7] hurd getcwd: Fix memory leak on error, Samuel Thibault, 2023/01/02