indexzero / ps-tree

MIT License
149 stars 29 forks source link

demo code not right on MAC #41

Open AceMood opened 4 years ago

AceMood commented 4 years ago

The demo code in README.md `var cp = require('child_process'), psTree = require('ps-tree');

var child = cp.exec("node -e 'while (true);'", function () { /.../ });

psTree(child.pid, function (err, children) { cp.spawn('kill', ['-9'].concat(children.map(function (p) { return p.PID }))); });`

seems have no children in psTree callback on MAC platform. Node version is 10.16.3 LTS

AceMood commented 4 years ago

@indexzero

nelsonic commented 4 years ago

@AceMood could you please add more detail on exactly what version of Mac OS you are using? 💻 We all use Mac for our dev work and have never had an issue with running ps-tree on our machines ... 💭

Could be worth adding a Mac/OSX test on CI to get 3rd party confirmation that this is working. 💡