[UNMAINTAINED] Get PID of running process
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-12-02 23:23:43 +01:00
lib Oh ffs. 2012-06-16 13:14:00 +02:00
test Also add negative test to be really sure. 2012-06-18 10:02:02 +02:00
.gitignore Oh ffs. 2012-06-16 13:14:00 +02:00
.travis.yml Added README and Travis. 2012-06-16 13:10:41 +02:00
example.js Example 2012-06-16 13:07:05 +02:00
LICENSE Relicense as MIT 2012-08-11 12:04:52 +02:00
package.json 1.0.2 2012-08-11 12:06:18 +02:00
README.md This project is unmaintained 2016-12-02 23:23:43 +01:00

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.

Unmaintained

pidof

build status

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