ps-tree.js 257 B

12345678910111213141516
  1. #!/usr/bin/env node
  2. 'use strict';
  3. //
  4. // Change the default parent PID if running
  5. // under Windows.
  6. //
  7. var ppid = 1;
  8. if (process.platform === 'win32') {
  9. ppid = 0;
  10. }
  11. require('../')(process.argv[2] || ppid, function (err, data) {
  12. console.log(data);
  13. });