Skip to content

zimtsui/lock-pid-file

Repository files navigation

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');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published