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 instancectl
4
5import (
6 "fmt"
7 "net"
8)
9
10func claimExecPeer(c net.Conn, pid int) error {
11 cred, err := peerCred(c)
12 if err != nil {
13 return err
14 }
15 if int(cred.Pid) != pid {
16 return fmt.Errorf("%w: executable gate peer %d differs from unit MainPID %d", ErrClaimUnit, cred.Pid, pid)
17 }
18 return nil
19}
20