Skip to content
Myr

noop-fd-large.js

This file

Path

test/fixtures/noop-fd-large.js

8 lines · 281 bytes · JavaScript

Last changed by

TweaksSindre Sorhusbefore adoption698a1b8

History of this file

Take it

Fix `result.all` and `subprocess.all` when only some file descriptors are bufferedSindre Sorhusbefore adoption758768f

lines 1–2why, one step back
1#!/usr/bin/env node
2import {Buffer} from 'node:buffer';

TweaksSindre Sorhusbefore adoption698a1b8

line 3why, one step back
3import process from 'node:process';

Fix `result.all` and `subprocess.all` when only some file descriptors are bufferedSindre Sorhusbefore adoption758768f

lines 4–8why, one step back
4import {getWriteStream} from '../helpers/fs.js';
56const fdNumber = Number(process.argv[2]);7const bytes = Number(process.argv[3]);8getWriteStream(fdNumber).write(Buffer.alloc(bytes, 'a'));