Releases: ramr/go-reaper
Releases · ramr/go-reaper
v0.2.3
- Adds child sub reaper support (
prctl
to ensure any orphaned descendant process will getreparented
to caller). - General testing infrastructure cleanup and added more tests.
config := reaper.Config{
Pid: 0,
Options: 0,
Debug: false,
DisablePid1Check: true,
EnableChildSubreaper: true,
StatusChannel: nil,
}
// Start background reaping of orphaned child processes.
go reaper.Start(config)
// Rest of your code ...
You may need to disable the pid 1 check DisablePid1Check
depending on how you are using this option.
What's Changed
Full Changelog: v0.2.2...v0.2.3
v0.2.2
Adds configuration option StatusChannel
that allows you to receive
status notifications whenever a descendant process (*child
) is reaped.
config := reaper.Config{
Pid: 0,
Options: 0,
Debug: true,
DisablePid1Check: false,
StatusChannel: make(chan reaper.Status, 42),
}
go func() {
select {
case status, ok := <-config.StatusChannel:
if !ok {
return
}
// process status (reaper.Status)
}
}()
// Start background reaping of orphaned child processes.
go reaper.Start(config)
v0.2.1
Release v0.2.0
Adds ability to toggle debug messages using a config flag Debug.
Usage:
config := reaper.Config{
Pid: 0,
Options: 0,
Debug: true,
DisablePid1Check: false,
}
// ...
go reaper.Start(config)
v0.1.0: Merge pull request #4 from ramr/round2
first post - tagging an old release of go-reaper