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

Function tf_coverage_channel_activate

tests/test_main.c:1262–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260}
1261
1262static bool tf_coverage_channel_activate(void) {
1263 if (tf_coverage_channel.started) {
1264 return tf_coverage_channel_unavailable("already-started");
1265 }
1266 tf_coverage_channel.started = true;
1267 tf_coverage_channel.owner = getpid();
1268 if (pipe(tf_coverage_channel.fd) != 0) {
1269 return tf_coverage_channel_unavailable("pipe");
1270 }
1271 if (!tf_coverage_channel_prepare_end(0) || !tf_coverage_channel_prepare_end(1) ||
1272 !tf_coverage_channel_intact()) {
1273 bool closed = tf_coverage_channel_abort_setup();
1274 return tf_coverage_channel_unavailable(closed ? "pipe-setup" : "pipe-setup-close");
1275 }
1276 tf_coverage_channel.active = true;
1277 return true;
1278}
1279
1280static void tf_coverage_channel_finish(void) {
1281 if (!tf_coverage_channel.active || getpid() != tf_coverage_channel.owner) {

Callers 1

tf_coverage_initFunction · 0.85

Tested by

no test coverage detected