Files
bun.sh/test/js/bun/spawn/job-object-bug.ts
2024-05-23 19:59:39 -07:00

17 lines
394 B
TypeScript

import { spawn } from "bun";
import { bunEnv, bunExe } from "harness";
import { join } from "node:path";
// prior, this would hang on Windows if you ran this with a pipe
const run = spawn({
cmd: [bunExe(), "--watch", join(import.meta.dirname, "empty.js")],
stdout: "inherit",
stderr: "inherit",
stdin: "ignore",
env: bunEnv,
});
await Bun.sleep(250);
run.kill(9);
await run.exited;