1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-18 13:22:55 -05:00
denoland-deno/tests/testdata/run/node_process_stdin_unref_with_pty.js

15 lines
360 B
JavaScript
Raw Normal View History

import process from "node:process";
import util from "node:util";
console.log("START");
globalThis.addEventListener("unload", () => console.log("END"));
const args = util.parseArgs({ options: { unref: { type: "boolean" } } });
// call stdin.unref if --unref is passed
if (args.values.unref) {
process.stdin.unref();
}
process.stdin.pipe(process.stdout);