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

Function local_socket_new

src/daemon/ipc.c:640–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640static int local_socket_new(void) {
641 int fd = socket(AF_UNIX, SOCK_STREAM, 0);
642 if (fd < 0) {
643 return -1;
644 }
645 if (!fd_set_cloexec(fd) || !fd_set_nonblocking(fd) || !socket_disable_sigpipe(fd)) {
646 (void)close(fd);
647 return -1;
648 }
649 return fd;
650}
651
652/* Keep the only raw connect call at a sockaddr_un-typed boundary so the
653 * security audit can count and review the complete local IPC surface. */

Callers 3

cbm_daemon_ipc_connectFunction · 0.85

Calls 3

fd_set_cloexecFunction · 0.85
fd_set_nonblockingFunction · 0.85
socket_disable_sigpipeFunction · 0.85

Tested by

no test coverage detected