A supervised long-running OS process.
Wraps NetRunner.Process for integration into a supervision tree.
Automatically drains stdout/stderr to prevent pipe blocking.
Usage
# In your supervision tree:
children = [
{NetRunner.Daemon, cmd: "redis-server", args: ["--port", "6380"], name: MyApp.Redis}
]
# Or start manually:
{:ok, pid} = NetRunner.Daemon.start_link(cmd: "tail", args: ["-f", "/var/log/syslog"],
on_output: :log)
# Interact:
NetRunner.Daemon.os_pid(pid)
NetRunner.Daemon.alive?(pid)
NetRunner.Daemon.write(pid, "input\n")
Summary
Functions
Returns a specification to start this module under a supervisor.