| β¦ | β¦ | @@ -0,0 +1,106 @@ | |
| 96 | + | " process.exit(11);", | |
| 97 | + | "}", | |
| 98 | + | `const forwarded = ${options.forwardArgs === false ? "[]" : "args"};`, | |
| 99 | + | `const result = spawnSync(process.execPath, [${JSON.stringify(options.scriptPath)}, ...forwarded], {`, | |
π‘ Medium testUtils/fakeCli.ts:99
When the ACP session terminates the stub with SIGTERM, the scriptPath process remains running, so tests waiting for the mock agent's SIGTERM log time out and leave a child process behind. Because spawnSync only waits for the child and does not forward termination signals to it, handle SIGTERM/SIGINT and relay them to the spawned script, or use an exec-style handoff for long-lived scripts.
No longer relevant as of e439d44d643ad25f9d69b65812ece4e9807aaaa6
Superseded: the stub now imports the mock in-process rather than spawning it, so there is no intermediate process to relay signals through.