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

Function local_socket_new

src/daemon/ipc.c:633–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631}
632
633static int local_socket_new(void) {
634 int fd = socket(AF_UNIX, SOCK_STREAM, 0);
635 if (fd < 0) {
636 return -1;
637 }
638 if (!fd_set_cloexec(fd) || !fd_set_nonblocking(fd) || !socket_disable_sigpipe(fd)) {
639 (void)close(fd);
640 return -1;
641 }
642 return fd;
643}
644
645/* Keep the only raw connect call at a sockaddr_un-typed boundary so the
646 * 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