hst/instance: store priv side pid
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m8s
Test / Sandbox (race detector) (push) Successful in 3m58s
Test / Hpkg (push) Successful in 4m1s
Test / Hakurei (race detector) (push) Successful in 4m44s
Test / Flake checks (push) Successful in 1m29s

This can receive signals, so is more useful to the caller.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-23 23:19:55 +09:00
parent dd94818f20
commit 05488bfb8f
4 changed files with 22 additions and 15 deletions

View File

@@ -74,8 +74,11 @@ func (a *ID) UnmarshalText(text []byte) error {
type State struct {
// Unique instance id, created by [NewInstanceID].
ID ID `json:"instance"`
// Shim process pid. Runs as the target user.
// Monitoring process pid. Runs as the priv user.
PID int `json:"pid"`
// Shim process pid. Runs as the target user.
ShimPID int `json:"shim_pid"`
// Configuration used to start the container.
Config *Config `json:"config"`