aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-23 23:19:55 +0900
committerOphestra <cat@gensokyo.uk>2025-10-23 23:19:55 +0900
commit05488bfb8f43f12bc0306e03b675d4f415fc6328 (patch)
tree63897f4bcb629e3326da36377bc04ca91e4e57f8 /internal
parentdd94818f20c7a37bdd7c6129551759db1b09b65e (diff)
hst/instance: store priv side pid
This can receive signals, so is more useful to the caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/app/process.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/app/process.go b/internal/app/process.go
index f71479bc..8e18ae64 100644
--- a/internal/app/process.go
+++ b/internal/app/process.go
@@ -290,10 +290,11 @@ func (k *outcome) main(msg message.Msg) {
// shim accepted setup payload, create process state
if ok, err := ms.store.Do(k.state.identity.unwrap(), func(c state.Cursor) {
if err := c.Save(&hst.State{
- ID: k.state.id.unwrap(),
- PID: ms.cmd.Process.Pid,
- Config: k.config,
- Time: *ms.Time,
+ ID: k.state.id.unwrap(),
+ PID: os.Getpid(),
+ ShimPID: ms.cmd.Process.Pid,
+ Config: k.config,
+ Time: *ms.Time,
}); err != nil {
ms.fatal("cannot save state entry:", err)
}