Skip to content
No description, website, or topics provided.
Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
README.md
mix.exs
mix.lock

README.md

PidFile

Manages a simple OS PID file for this BEAM system.

In other words it just makes a file whose sole contents is the Operating System PID of the running BEAM process.

It should also auto-clean old PID files on load, and clear the PID file on a 'proper' shutdown, but even if not a proper shutdown then it will still clear it properly next time.

Hex: https://hex.pm/packages/pid_file

Installation

    {:pid_file, "~> 0.1.0"},

Setup

Global Config

Add one of these to your config for it to be managed globally, replacing the values as necessary:

config :pid_file, file: "./my_app.pid"
config :pid_file, file: {:SYSTEM, "PIDFILE"}

Locally Managed

Add the worker to your supervision tree:

worker(PidFile.Worker, [[file: "/run/my_app.pid"]])
You can’t perform that action at this time.