Skip to content

Commit

Permalink
getrlimit:implement RLIMIT_STACK return limit stack size
Browse files Browse the repository at this point in the history
Signed-off-by: meijian <[email protected]>
  • Loading branch information
Meissi-jian committed Aug 19, 2024
1 parent 6071102 commit b69ae73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/libc/unistd/lib_getrlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <errno.h>

#include <sys/resource.h>
#include <pthread.h>

/****************************************************************************
* Public Functions
Expand Down Expand Up @@ -64,7 +65,12 @@ int getrlimit(int resource, FAR struct rlimit *rlp)
rlp->rlim_max = OPEN_MAX;
}
break;

case RLIMIT_STACK:
{
rlp->rlim_cur = PTHREAD_STACK_DEFAULT;
rlp->rlim_max = RLIM_INFINITY;
}
break;
default:
break;
}
Expand Down

0 comments on commit b69ae73

Please sign in to comment.