Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 381 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 381 Bytes

Subprocess

Subprocess abstracts running processes with restarts.

Install

go get -u github.com/jakubdal/subprocess

Usage

Run a process that restarts on error

proc, err := subprocess.NewProcess(context.Background(), nil, "sleep", nil, "3s")

Stop the process

proc.Stop()

Send a signal to process

proc.Signal(os.Interrupt)