INNER CODE UNIT · JavaScript

shutdown

entropy-cloud/nop-entropy · tools/mission-driver/src/main.js:116

  const shutdown = async (sig) => {
    process.stderr.write(`\n[${sig}] closing monitor ...\n`);
    try { await monitor.close(); } catch {}
    process.exit(0);
  };
  process.on("SIGTERM", () => shutdown("SIGTERM"));
  process.on("SIGINT", () => shutdown("SIGINT"));
}

// ── Subcommand: list (list-missions) ────────────────────────────────────────

function cmdListMissions(opts) {
  const projectRoot = resolveProjectRoot(opts);
  const missionsDir = resolveMissionsDir(opts, projectRoot);
  console.log(`Missions in ${missionsDir}:`);
  console.log(listMissionsString(missionsDir));
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…