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

Function ipc_retry_pause

src/daemon/ipc.c:597–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597static bool ipc_retry_pause(uint64_t deadline_ms) {
598 int remaining_ms = deadline_remaining_ms(deadline_ms);
599 if (remaining_ms <= 0) {
600 return false;
601 }
602 int pause_ms = remaining_ms < CBM_DAEMON_IPC_RETRY_INTERVAL_MS
603 ? remaining_ms
604 : CBM_DAEMON_IPC_RETRY_INTERVAL_MS;
605 struct timespec pause = {
606 .tv_sec = 0,
607 .tv_nsec = (long)pause_ms * 1000000L,
608 };
609 while (nanosleep(&pause, &pause) != 0 && errno == EINTR) {}
610 return true;
611}
612
613static bool fd_set_cloexec(int fd) {
614 int flags = fcntl(fd, F_GETFD);

Callers 1

cbm_daemon_ipc_connectFunction · 0.85

Calls 1

deadline_remaining_msFunction · 0.85

Tested by

no test coverage detected