1.0.2 • Published 12 years ago

pidof v1.0.2

Weekly downloads
8,523
License
-
Repository
github
Last release
12 years ago

pidof

build status

Get the PID of a running process, or null if it couldn't be found.

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');
        }
    }
});