`bash -c` hang forever
-
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`);
});

Nerver exit child process!

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
@purocean - This issue has been fixed internally and will be available in a Windows Insider build sometime soon.
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

This is https://github.com/Microsoft/WSL/issues/2592
@benhillis I think it might be closed only after including fix to main updates channel.
Closed because it is a duplicate of another issue.