@nxmix/pid-file

0.3.5 • Public • Published

pid-file

create pif file and has some options

Example

pid = require 'pid-file'
pid.create
  filename : 'pidfile.pid'

Create pid file on os.tmpDir(). If exists, rewrite.

pid = require 'pid-file'
pid.create
  filename : 'pidfile.pid'
  errorOnExist : true

Create pid file on os.tmpDir() . If exists, throw Error.

pid = require 'pid-file'
pid.create
  filename : 'pidfile.pid'
  deleteOnExit : true

When program exit normally, delete pid file.

But, in windows ctrl + C didn't make exit event

pid = require 'pid-file'
pid.create
  path : 'pid/app_name.pid'
  local : true

Create pid file locally to your current working directory.

Why Create Another PID module?

Other PID module I tried throw Error when exist PID File.

But, in my development progress kill process is usaul action.

So, I make another one.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @nxmix/pid-file

Weekly Downloads

2

Version

0.3.5

License

MIT

Unpacked Size

2.62 kB

Total Files

3

Last publish

Collaborators

  • jacobbubu
  • nxdeploy
  • zhengle