fuweid / embedshim

Provide task runtime implementation with pidfd and eBPF sched_process_exit tracepoint to manage deamonless container with low overhead.
Apache License 2.0
116 stars 10 forks source link

fix: exitCode needs to be translated before use #14

Closed fuweid closed 2 years ago

fuweid commented 2 years ago

Current:

➜  embedshim git:(unstable) sudo ctr run --rm --runtime io.containerd.runtime.v1.embed docker.io/library/alpine:latest testing sh -c "exit 10"
➜  embedshim git:(unstable) echo $?
0

After:

➜  embedshim git:(fix-issue) sudo ctr run --rm --runtime io.containerd.runtime.v1.embed docker.io/library/alpine:latest testing sh -c "exit 10"
➜  embedshim git:(fix-issue) echo $?
10

Signed-off-by: Wei Fu fuweid89@gmail.com