pidof

1.0.2 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    48,509
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    48,509
  • 1.0.1
    2
  • 1.0.0
    4

Package Sidebar

Install

npm i pidof

Weekly Downloads

28,924

Version

1.0.2

License

none

Last publish

Collaborators

  • calmh