Daemonless background processes for Linux
Go to file
2024-10-20 22:09:07 +03:00
src fix duplicates in labels list 2024-10-20 09:00:19 +03:00
.editorconfig init 2024-10-20 07:07:47 +03:00
.gitattributes init 2024-10-20 07:07:47 +03:00
.gitignore init 2024-10-20 07:07:47 +03:00
completion.bash fix executable path 2024-10-20 07:26:24 +03:00
Makefile add install target 2024-10-20 22:09:07 +03:00
ptrc.toml init 2024-10-20 07:07:47 +03:00
README.md init 2024-10-20 07:07:47 +03:00
v.mod init 2024-10-20 07:07:47 +03:00

pt — daemonless background processes for Linux (WIP)

Run and manage background processes without daemon or root privileges. pt is a small process manager with limited capabilities

pt stands for process tool.

Features

  • Run arbitrary command in background. The process will be adopted by /sbin/init.
  • No daemon needed. pt just stores pidfile in runtime directory and checks procfs on invokation.
  • Run commands defined in the configuration file.
  • Set environment and working directory for process.
  • Run commands selected by labels.
  • Print defined commands and currently running commands.
  • [not implemented] Run commands without writing configuration file.
  • [not implemented] TUI.

Install

First install V compiler.

Clone this repo and do:

cd pt
make
install -Dm0755 pt $HOME/.local/bin/pt
install -Dm0644 completion.bash ${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions/pt

Next step is configuration.

Configuration

Default configuration file is ~/.ptrc. This is TOML format file.

See full configuration example with comments in ptrc.toml.