diff --git a/src/vs/base/node/ps.ts b/src/vs/base/node/ps.ts index f0410cc42d449d94b0d7fd85938c2a10480d9528..a7d2d36d0ca52127f2310ef765412224f0241fb8 100644 --- a/src/vs/base/node/ps.ts +++ b/src/vs/base/node/ps.ts @@ -206,7 +206,8 @@ export function listProcesses(rootPid: number): Promise { // The cpu usage value reported on Linux is the average over the process lifetime, // recalculate the usage over a one second interval - let cmd = URI.parse(require.toUrl('vs/base/node/cpuUsage.sh')).fsPath; + // JSON.stringify is needed to escape spaces, https://github.com/nodejs/node/issues/6803 + let cmd = JSON.stringify(URI.parse(require.toUrl('vs/base/node/cpuUsage.sh')).fsPath); cmd += ' ' + pids.join(' '); exec(cmd, {}, (err, stdout, stderr) => {