feat: Add wait4 loop in main

hey, i know this is ugly
but it works!
This commit is contained in:
ptrcnull 2021-11-30 00:59:53 +01:00
parent 180881639b
commit 83a7661a7d
2 changed files with 8 additions and 4 deletions

View file

@ -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 {}
}

View file

@ -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
}