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

Function close_open_fds_except

daemonize.c:577–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577void close_open_fds_except(int except)
578{
579 int fd, open_max = get_open_fds_limit();
580 for (fd = 3; fd < open_max; fd++)
581 if (fd != except)
582 syscall(SYS_close, fd);
583}

Callers 2

daemonizeFunction · 0.85
send_mailFunction · 0.85

Calls 1

get_open_fds_limitFunction · 0.85

Tested by

no test coverage detected