WSL icon indicating copy to clipboard operation
WSL copied to clipboard

`bash -c` hang forever

Open purocean opened this issue 9 years ago • 7 comments

  • Your Windows build number: Microsoft Windows [10.0.16278.1000]

  • What you're doing and what's happening:
    Today I upgrade Windows 10 to 10.0.16278.1000, my VSCode some commands not work.

  • Test node script:

const spawn = require('child_process').spawn;

const dir = spawn('cmd', ['/c', 'dir']);
dir.stdout.on('data', (data) => {
  console.log(`>>>>>stdout: ${data}`);
});

dir.stderr.on('data', (data) => {
  console.log(`>>>>>>stderr: ${data}`);
});

dir.on('close', () => {
  console.log(`>>>>>>>close`);
  console.log('------------------------------------------------');
});

dir.on('exit', () => {
  console.log(`>>>>>>>exit`);
});

dir.on('disconnect', () => {
  console.log(`>>>>>>>disconnect`);
});

//////////////////////////////////////////////////////////

const ls = spawn('bash', ['-c', 'ls']);

ls.stdout.on('data', (data) => {
  console.log(`>>>>>stdout: ${data}`);
});

ls.stderr.on('data', (data) => {
  console.log(`>>>>>>stderr: ${data}`);
});

ls.on('close', () => {
  console.log(`>>>>>>>close`);
});

ls.on('exit', () => {
  console.log(`>>>>>>>exit`);
});

ls.on('disconnect', () => {
  console.log(`>>>>>>>disconnect`);
});

image

Nerver exit child process!

purocean avatar Aug 30 '17 11:08 purocean

image

purocean avatar Aug 30 '17 12:08 purocean

Same situation, ide(phpstorm, vscode) show error when call bash -c ... (or ubuntu run ... and etc) only on build 16278

https://youtrack.jetbrains.com/issue/WI-37962

xeurun avatar Sep 11 '17 06:09 xeurun

@purocean - This issue has been fixed internally and will be available in a Windows Insider build sometime soon.

benhillis avatar Sep 11 '17 23:09 benhillis

I have this issue too.. For example, when I added File Watcher for compiling "less" files in PHPStorm, it calls and executed but shown as infinity loading 2017-10-27_16-51-48

rizhenkov avatar Oct 27 '17 13:10 rizhenkov

This is https://github.com/Microsoft/WSL/issues/2592

hurricup avatar Oct 27 '17 14:10 hurricup

@benhillis I think it might be closed only after including fix to main updates channel.

rizhenkov avatar Feb 08 '18 21:02 rizhenkov

Closed because it is a duplicate of another issue.

benhillis avatar Feb 08 '18 21:02 benhillis