Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yibn2008/check-process
check exisitance of process by pid
https://github.com/yibn2008/check-process
node pid process
Last synced: 20 days ago
JSON representation
check exisitance of process by pid
- Host: GitHub
- URL: https://github.com/yibn2008/check-process
- Owner: yibn2008
- Created: 2017-03-08T14:48:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T15:46:08.000Z (almost 8 years ago)
- Last Synced: 2024-11-16T15:06:59.566Z (about 1 month ago)
- Topics: node, pid, process
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
# check-process
check existence of process by pid
## Usage
```js
const check = require('check-process')
const cp = require('child_process')// return { exists: true, killable: false }
check(1)// return { exists: true, killable: true }
let child = cp.exec(process.execPath, [someScript])
check(child.pid)
```## API
### `check(pid)`
- `pid`, *{Number}* process PID
Check existence of process by pid.
Return a object:
```
{
exists: , // is process exists
killable: // is process killable
}
```## LICENSE
MIT