INNER CODE UNIT · TypeScript

OURS

AmrDab/clawdcursor · src/surface/cli.ts:139

  const OURS = /node|clawdcursor/i;

  if (os.platform() === 'win32') {
    try {
      const output = execSync(
        `netstat -ano | findstr :${port} | findstr LISTENING`,
        { encoding: 'utf-8' },
      );
      const pids = new Set(
        output.trim().split('\n')
          .map(line => line.trim().split(/\s+/).pop())
          .filter((pid): pid is string => !!pid && /^\d+$/.test(pid))
      );

      if (pids.size === 0) return false;
      let killedAny = false;
      for (const pid of pids) {
        let image = '';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…