Files
scriptc/tests/corpus/3072-weak-process-streams.js
Chris Tate cbb8fc380a Link native FFI libraries and callbacks without a JavaScript engine
- Add exact 64-bit and pointer ABIs, static node:ffi bindings, and Darwin framework linking.
- Support native memory views and reusable callback pools with checked conversions and lifetime handling.
- Preserve the JavaScript values, accessors, and module bindings used during renderer initialization.
2026-09-29 08:07:03 -05:00

10 lines
457 B
JavaScript

const owners = new WeakMap();
const streams = new WeakSet();
for (const stream of [process.stdin, process.stdout, process.stderr]) {
console.log(owners.get(stream) === undefined, streams.has(stream));
owners.set(stream, stream.fd);
streams.add(stream);
}
console.log(owners.get(process.stdin), owners.get(process.stdout), owners.get(process.stderr));
console.log(streams.has(process.stdin), owners.delete(process.stdout), owners.has(process.stdout));