MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / get_open_fds_limit

Function get_open_fds_limit

daemonize.c:557–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555
556
557int get_open_fds_limit(void)
558{
559 struct rlimit rl;
560 int open_max;
561 if (open_files_limit > 0)
562 return open_files_limit;
563 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
564 open_max = sysconf(_SC_OPEN_MAX);
565 return (open_max < 0?_POSIX_OPEN_MAX:open_max);
566 }
567 return rl.rlim_cur;
568}
569
570void close_open_fds(void)
571{

Callers 2

close_open_fdsFunction · 0.85
close_open_fds_exceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected