refactor: reap zombie process and opt-out with no-reap flag (#172)

* fix: random waitid error

fix https://github.com/aptible/supercronic/issues/171

* fix(reap): forward signal

* refactor: modify reaper to get supercronic exitStatus

* fix(reaper): unify signal list & fix signal forward

* chore: replace ioutil to io

* fix(test): ci timeout

* opt-out with no-reap flag

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>

* fix: typo on signal

* fix: args pass to supercronic

* fix(test): remove removed flag

* chore: remove misleading comment

---------

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>
This commit is contained in:
Fei Yang
2024-10-11 00:44:43 +08:00
committed by GitHub
parent bfb0d97ba6
commit 8b4edf5920
9 changed files with 176 additions and 22 deletions

View File

@@ -3,7 +3,7 @@ package cron
import (
"context"
"fmt"
"io/ioutil"
"io"
"regexp"
"strings"
"sync"
@@ -41,7 +41,7 @@ func (hook *testHook) Levels() []logrus.Level {
func newTestLogger() (*logrus.Entry, chan *logrus.Entry) {
logger := logrus.New()
logger.Out = ioutil.Discard
logger.Out = io.Discard
logger.Level = logrus.DebugLevel
channel := make(chan *logrus.Entry, TEST_CHANNEL_BUFFER_SIZE)