Add the javascript way

This commit is contained in:
Aviskar KC 2019-09-30 22:19:12 +05:45
parent 8c6d0249e2
commit 4f38f6865f

View file

@ -260,3 +260,16 @@ Run vim inside Termux and run this when you want to exit:
```
:!su -c killall zygote
```
## The JavaScript way
```
const ps = require('ps-node');
ps.lookup({ command: 'vim' }, function(error, resultList) {
resultList.forEach(function(process) {
if (process) {
ps.kill(process.pid);
}
});
});
```