This commit is contained in:
parent
71c82120d5
commit
7eeb25a436
1 changed files with 4 additions and 0 deletions
|
@ -43,10 +43,14 @@ function buildTree(allPids, spawnGetChildren, parentPid) {
|
||||||
ps.stdout.on('data', function(buf) {
|
ps.stdout.on('data', function(buf) {
|
||||||
data += buf.toString('ascii')
|
data += buf.toString('ascii')
|
||||||
})
|
})
|
||||||
|
ps.stderr.on('data', function(buf) {
|
||||||
|
data += buf.toString('ascii')
|
||||||
|
})
|
||||||
|
|
||||||
return new Promise(function(res) {
|
return new Promise(function(res) {
|
||||||
ps.on('close', function(code) {
|
ps.on('close', function(code) {
|
||||||
// Check if we got error code (usually means empty results)
|
// Check if we got error code (usually means empty results)
|
||||||
|
console.log(data)
|
||||||
if (code !== 0) return res()
|
if (code !== 0) return res()
|
||||||
|
|
||||||
res(Promise.all(
|
res(Promise.all(
|
||||||
|
|
Loading…
Reference in a new issue