diff --git a/pkg/katautils/hook.go b/pkg/katautils/hook.go index cfb15522e0..c73ac2ab62 100644 --- a/pkg/katautils/hook.go +++ b/pkg/katautils/hook.go @@ -11,7 +11,6 @@ import ( "context" "encoding/json" "fmt" - "os" "os/exec" "strings" "syscall" @@ -39,7 +38,7 @@ func runHook(ctx context.Context, hook specs.Hook, cid, bundlePath string) error log.String("hook-args", strings.Join(hook.Args, " "))) state := specs.State{ - Pid: os.Getpid(), + Pid: syscall.Gettid(), Bundle: bundlePath, ID: cid, }