WIP: unit test done, need further test

This commit is contained in:
2025-05-25 09:12:39 +10:00
parent 6e84adbf16
commit 61d735bbad
11 changed files with 130 additions and 47 deletions
+2 -2
View File
@@ -19,14 +19,14 @@ func (i *Init) sighandler(wg *sync.WaitGroup, trigger chan<- any, selfExit <-cha
isOpen := true
c := make(chan os.Signal, 1)
signal.Notify(c, unix.SIGINT, unix.SIGTERM, unix.SIGCHLD)
signal.Notify(c, unix.SIGINT, unix.SIGTERM, unix.SIGQUIT, unix.SIGCHLD)
signal:
for {
select {
case s := <-c:
switch s {
case unix.SIGTERM, unix.SIGINT:
case unix.SIGTERM, unix.SIGINT, unix.SIGQUIT:
if isOpen {
wingmate.Log().Info().Msg("initiating shutdown...")
close(trigger)