@zimtsui/lock-pid-file
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

lock-pid-file

Npm package version

This function creates a .pid file in XDG_RUNTIME_DIR with the process ID written into it, and sets a POSIX Advisory Record Lock on the entire file.

If the file is already locked by any other processes, it throws.

Examples

import { lockPidFile } from 'lock-pid-file';
lockPidFile('app-name-in-kebab-case');

Readme

Keywords

none

Package Sidebar

Install

npm i @zimtsui/lock-pid-file

Weekly Downloads

3

Version

0.0.4

License

none

Unpacked Size

27.4 kB

Total Files

14

Last publish

Collaborators

  • zimtsui