mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08: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)
|
if (stacksize == 0)
|
||||||
{
|
{
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
__getrlimit (RLIMIT_STACK, &rlim);
|
err = __getrlimit (RLIMIT_STACK, &rlim);
|
||||||
if (rlim.rlim_cur != RLIM_INFINITY)
|
if (err == 0 && rlim.rlim_cur != RLIM_INFINITY)
|
||||||
stacksize = rlim.rlim_cur;
|
stacksize = rlim.rlim_cur;
|
||||||
if (stacksize == 0)
|
if (stacksize == 0)
|
||||||
stacksize = PTHREAD_STACK_DEFAULT;
|
stacksize = PTHREAD_STACK_DEFAULT;
|
||||||
|
Loading…
Reference in New Issue
Block a user