Skip to content

After 10 echo commands, the process appears to be blocked #434

Open
@I-Want-ToBelieve

Description

@I-Want-ToBelieve

It's very easy to reproduce the problem

const execa = require('execa')
const p = execa('powershell.exe', [
  '-NoLogo',
  '-NoExit',
  '-NoProfile',
  '-ExecutionPolicy',
  'ByPass',
])
p.stdout.pipe(process.stdout)
let i = 0
setInterval(() => {
  p.stdin.write(`echo ${i++}\n`)
}, 100)

If you replace PowerShell with CMD, it can last up to 15 times😅

const execa = require('execa')
const p = execa('cmd.exe')
p.stdout.pipe(process.stdout)
let i = 0
setInterval(() => {
  p.stdin.write(`echo ${i++}\n`)
}, 100)

Maybe I did something wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions