feat: Add wait4 loop in main
hey, i know this is ugly but it works!
This commit is contained in:
parent
180881639b
commit
83a7661a7d
2 changed files with 8 additions and 4 deletions
6
main.go
6
main.go
|
@ -57,6 +57,12 @@ func main() {
|
|||
|
||||
signal.Notify(sigs, syscall.SIGUSR2, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGINT)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
syscall.Wait4(-1, nil, 0, nil)
|
||||
}
|
||||
}()
|
||||
|
||||
select {}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,10 +30,8 @@ func Exec(entry InitTabEntry) error {
|
|||
return fmt.Errorf("spawn: %w", err)
|
||||
}
|
||||
|
||||
err = cmd.Wait()
|
||||
if err != nil {
|
||||
return fmt.Errorf("wait: %w", err)
|
||||
}
|
||||
// skipping error handling due to wait4 in main
|
||||
cmd.Wait()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue