MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / bootstrap_child_close_fds

Function bootstrap_child_close_fds

src/daemon/bootstrap.c:929–937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

927}
928#else
929static void bootstrap_child_close_fds(void) {
930 long open_max = sysconf(_SC_OPEN_MAX);
931 if (open_max < 0 || open_max > 1048576L) {
932 open_max = 65536L;
933 }
934 for (int fd = 3; fd < open_max; fd++) {
935 (void)close(fd);
936 }
937}
938
939static void bootstrap_daemon_grandchild(const cbm_daemon_bootstrap_launch_spec_t *spec) {
940 (void)umask(077);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected