1
0
mirror of https://github.com/rancher/os.git synced 2025-09-08 18:20:32 +00:00
Files
os/pkg/init/one/one.go
Olli Janatuinen 4148642e5f v2.0.0-beta6
- Buildroot 2022.02.8
-- with cherry-picked memory leak fix for dhcpcd
- Kernel 5.10.162
- Docker 23.0.0-rc.3
- System-docker 17.06.107
- Removed debugging tool system-docker-containerd-ctr
- Build ros binary with Go version 1.19.5
- Improve debug mode by disabling auto reboot and asking resolution
2023-01-22 14:16:32 +01:00

26 lines
329 B
Go

//go:build linux
// +build linux
package one
import (
"os"
"os/signal"
"syscall"
)
func PidOne() error {
c := make(chan os.Signal, 2048)
signal.Notify(c, syscall.SIGCHLD)
for range c {
for {
if pid, err := syscall.Wait4(-1, nil, syscall.WNOHANG, nil); err != nil || pid <= 0 {
break
}
}
}
return nil
}