mirror of
https://github.com/calmh/node-pidof.git
synced 2026-07-17 01:35:01 +00:00
[UNMAINTAINED] Get PID of running process
- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| lib | ||
| test | ||
| .gitignore | ||
| .travis.yml | ||
| example.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
This project is not actively maintained
Issues and pull requests on this repository may not be acted on in a timely manner, or at all. You are of course welcome to use it anyway. You are even more welcome to fork it and maintain the results.
pidof
Get the PID of a running process, or null if it couldn't be found. Tested on
Mac OS X, Solaris and Linux. Guaranteed not to work on Windows.
Example
var pidof = require('pidof');
pidof('cron', function (err, pid) {
if (err) {
console.log('Weird error getting PIDs');
console.log(err);
} else {
if (pid) {
console.log('Found cron at pid ' + pid);
} else {
console.log('Seems like there\'s no cron on this system');
}
}
});
License
MIT

