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

Function alarm_handler

tests/test_mcp.c:20158–20164  ·  view source on GitHub ↗

Signal handler used by alarm() to abort the test if it hangs */

Source from the content-addressed store, hash-verified

20156
20157/* Signal handler used by alarm() to abort the test if it hangs */
20158static void alarm_handler(int sig) {
20159 (void)sig;
20160 /* Writing to stderr is async-signal-safe */
20161 const char msg[] = "FAIL: mcp_server_run_rapid_messages timed out (>5s)\n";
20162 write(STDERR_FILENO, msg, sizeof(msg) - 1);
20163 _exit(1);
20164}
20165
20166TEST(mcp_server_run_rapid_messages) {
20167 /* Simulate a client sending initialize + notifications/initialized +

Callers

nothing calls this directly

Calls 2

_exitFunction · 0.85
writeFunction · 0.50

Tested by

no test coverage detected