Skip to content

Releases: ramr/go-reaper

v0.2.3

05 Nov 04:46
67fbabb
Compare
Choose a tag to compare
  • Adds child sub reaper support (prctl to ensure any orphaned descendant process will get reparented 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

  • Add subreaper functionality (stale code), add more tests and cleanup tests by @ramr in #27

Full Changelog: v0.2.2...v0.2.3

v0.2.2

26 Oct 01:13
Compare
Choose a tag to compare

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

11 Mar 00:57
d197ec7
Compare
Choose a tag to compare

Adds go.mod file to repo.

Release v0.2.0

14 Jul 00:14
8f6f505
Compare
Choose a tag to compare

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

14 Jul 00:11
Compare
Choose a tag to compare

first post - tagging an old release of go-reaper