New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pidlock

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pidlock

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Pidlock

Build Status

This is a ruby library for using pid-file based locking of programs/daemons to prevent multiple parallel running tasks.

Prerequisites

The gem sys/proctable is required.

Usage

require 'sys/proctable'

pidlock = Pidlock.new('my.pid')   # Instantiates a lock
pidlock.lock                      # tries to create a lock file '/var/run/my.pid';
                                  # raises an error if the file is locked or a program exists that
                                  # has the same basename and pid (here: 'my')
...
pidlock.unlock                    # closes and removes the file

TODO

  • test unlocking in projects.

LICENSE

ISC License

CONTRIBUTORS

  • Greg Whiteley (https:/github/com/whitty)

FAQs

Package last updated on 10 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc