carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build linux
2
3package hostexec
4
5import "context"
6
7func ControllerAlive(ctx context.Context, p ControllerProcess) error {
8 if err := ctx.Err(); err != nil {
9 return err
10 }
11 boot, err := BootID()
12 if err != nil {
13 return err
14 }
15 start, err := controllerProcessStart(p.PID)
16 if err != nil {
17 return err
18 }
19 if boot != p.KernelBootID || start != p.Start {
20 return ErrLost
21 }
22 return nil
23}
24