Answers for "js check proccess alive"

1

js check proccess alive

const psList = require('ps-list');
(async () => {
  a = await psList(); // List all processes alive
  var b = a.filter(o => {
    if(o.pid === process.pid) { // process the process you want to check
      console.log(o); // Log the process if it is alive
    }
  })
})();
Posted by: Guest on December-07-2020

Code answers related to "js check proccess alive"

Code answers related to "Javascript"

Browse Popular Code Answers by Language