mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
htl: Check error returned by __getrlimit
This commit is contained in:
parent
a09183aed7
commit
3a614f39e6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user