pkill
v2.0.0
Published
Convenience wrapper around `pkill(1)`.
Downloads
1,200
Readme
pkill
Convenience wrapper around pkill(1)
.
Usage
Sync
- Will throw if there's a problem.
- Does not throw for no matching processes.
// kills all processes named 'node'
pkill('node')
Match on full exec pattern: pkill.full
// kills all processes matching 'node debug'
pkill.full('node debug')
Async
- Does not err for no matching processes.
pkill('node', function (err, validPid) {
err // if err.
validPid // if matched any processes
})
Compatibility
- Not work on windows.
License
MIT