projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
make pthread_create return EAGAIN on resource failure, as required by POSIX
[oweals/musl.git]
/
src
/
linux
/
getdtablesize.c
1
#include <limits.h>
2
#include <sys/resource.h>
3
4
int getdtablesize(void)
5
{
6
struct rlimit rl;
7
getrlimit(RLIMIT_NOFILE, &rl);
8
return rl.rlim_max < INT_MAX ? rl.rlim_max : INT_MAX;
9
}