added file-access and dir-access to cmd/http/httpd.c

This commit is contained in:
2013-02-21 15:00:08 +00:00
parent b677b4a892
commit b420a7c0dc
10 changed files with 721 additions and 188 deletions

View File

@ -385,8 +385,13 @@ static int get_highest_fd (void)
#endif
}
else fd = rlim.rlim_max;
if (fd == -1) fd = 1024; /* fallback */
/* F_MAXFD is the highest fd. but RLIMIT_NOFILE and
* _SC_OPEN_MAX returnes the maximum number of file
* descriptors. make adjustment */
if (fd > 0) fd--;
}
if (fd == -1) fd = 1024; /* fallback */
return fd;
}