https://github.com/msantos/goreap
User init to supervise and terminate subprocesses
https://github.com/msantos/goreap
fork prctl procctl signal supervisor
Last synced: about 2 months ago
JSON representation
User init to supervise and terminate subprocesses
- Host: GitHub
- URL: https://github.com/msantos/goreap
- Owner: msantos
- License: isc
- Created: 2021-02-11T12:11:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T11:21:20.000Z (9 months ago)
- Last Synced: 2025-02-13T05:30:05.509Z (4 months ago)
- Topics: fork, prctl, procctl, signal, supervisor
- Language: Go
- Homepage:
- Size: 86.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SYNOPSIS
[](https://pkg.go.dev/github.com/msantos/goreap)
goreap [*options*] <...>
# DESCRIPTION
Supervise and terminate subprocesses.
See [reap](https://github.com/leahneukirchen/reap).
# BUILDING
```
CGO_ENABLED=0 go build -trimpath -ldflags "-w" ./cmd/goreap
```# EXAMPLES
```
goreap catgoreap sh -c "sleep inf & sleep inf & sleep 5"
$ goreap sh -c "sleep inf & sleep inf & pstree -pga $$; sleep 5"
bash,9062,9062
└─goreap,31262,31262 sh -c ...
├─sh,31267,31262 -c sleep inf & sleep inf & pstree -pga 9062; sleep 5
│ ├─pstree,31270,31262 -pga 9062
│ ├─sleep,31268,31262 inf
│ └─sleep,31269,31262 inf
├─{goreap},31263,31262
├─{goreap},31264,31262
├─{goreap},31265,31262
├─{goreap},31266,31262
├─{goreap},31271,31262
└─{goreap},31272,31262
```# OPTIONS
deadline
: send SIGKILL if processes running after deadline (0 to disable) (default 60s)disable-setuid
: disallow setuid (unkillable) subprocessesdelay *duration*
: interval between signals (0 to disable) (default 1s)signal *int*
: signal sent to supervised processes (default 15)verbose
: debug outputwait
: wait for subprocesses to exit# TESTS
```
bats test
```