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

Function local_socket_new

src/daemon/ipc.c:812–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812static int local_socket_new(void) {
813 int fd = socket(AF_UNIX, SOCK_STREAM, 0);
814 if (fd < 0) {
815 return -1;
816 }
817 if (!fd_set_cloexec(fd) || !fd_set_nonblocking(fd) || !socket_disable_sigpipe(fd)) {
818 (void)close(fd);
819 return -1;
820 }
821 return fd;
822}
823
824/* Keep the only raw connect call at a sockaddr_un-typed boundary so the
825 * security audit can count and review the complete local IPC surface. */

Callers 3

cbm_daemon_ipc_connectFunction · 0.85

Calls 4

fd_set_cloexecFunction · 0.85
fd_set_nonblockingFunction · 0.85
socket_disable_sigpipeFunction · 0.85
closeFunction · 0.50

Tested by

no test coverage detected