parent-death-guard-host.ts 468 B

12345678910
  1. import { createLocalBashOperations } from "../../src/core/tools/bash.ts";
  2. const markerFile = process.argv[2];
  3. if (!markerFile) throw new Error("marker file argument is required");
  4. const operations = createLocalBashOperations({ parentDeathGuard: true });
  5. await operations.exec('echo $$ > "$MINIMAX_PARENT_DEATH_MARKER"; while true; do sleep 0.1; done', process.cwd(), {
  6. env: { ...process.env, MINIMAX_PARENT_DEATH_MARKER: markerFile },
  7. onData: () => undefined,
  8. });