mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-07 06:33:09 +00:00
katautils: Use a syscall wrapper for the hook JSON state
There is no real equivalent of a thread ID on Darwin. Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
This commit is contained in:
parent
7d64ae7a41
commit
56751089c0
@ -16,6 +16,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/pkg/katautils/katatrace"
|
"github.com/kata-containers/kata-containers/src/runtime/pkg/katautils/katatrace"
|
||||||
|
syscallWrapper "github.com/kata-containers/kata-containers/src/runtime/pkg/syscall"
|
||||||
"github.com/opencontainers/runtime-spec/specs-go"
|
"github.com/opencontainers/runtime-spec/specs-go"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
@ -38,7 +39,7 @@ func runHook(ctx context.Context, spec specs.Spec, hook specs.Hook, cid, bundleP
|
|||||||
katatrace.AddTags(span, "path", hook.Path, "args", hook.Args)
|
katatrace.AddTags(span, "path", hook.Path, "args", hook.Args)
|
||||||
|
|
||||||
state := specs.State{
|
state := specs.State{
|
||||||
Pid: syscall.Gettid(),
|
Pid: syscallWrapper.Gettid(),
|
||||||
Bundle: bundlePath,
|
Bundle: bundlePath,
|
||||||
ID: cid,
|
ID: cid,
|
||||||
Annotations: spec.Annotations,
|
Annotations: spec.Annotations,
|
||||||
|
Loading…
Reference in New Issue
Block a user