提交 c7e72d7f 编写于 作者: D Daniel Imms

Speed up lsof by avoiding unneeded work

Fixes #78438
上级 334b6362
...@@ -260,7 +260,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess ...@@ -260,7 +260,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
return; return;
} }
this._logService.trace('IPty#pid'); this._logService.trace('IPty#pid');
exec('lsof -p ' + this._ptyProcess.pid + ' | grep cwd', (error, stdout, stderr) => { exec('lsof -OPl -p ' + this._ptyProcess.pid + ' | grep cwd', (error, stdout, stderr) => {
if (stdout !== '') { if (stdout !== '') {
resolve(stdout.substring(stdout.indexOf('/'), stdout.length - 1)); resolve(stdout.substring(stdout.indexOf('/'), stdout.length - 1));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册