mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 08:28:34 +00:00
Merge pull request #4571 from fidencio/topic/stable-2.4-set-status-if-wait-process-failed
stable-2.4 | shim: set a non-zero return code if the wait process call failed.
This commit is contained in:
@@ -53,6 +53,11 @@ func wait(ctx context.Context, s *service, c *container, execID string) (int32,
|
||||
"container": c.id,
|
||||
"pid": processID,
|
||||
}).Error("Wait for process failed")
|
||||
|
||||
// set return code if wait failed
|
||||
if ret == 0 {
|
||||
ret = exitCode255
|
||||
}
|
||||
}
|
||||
|
||||
timeStamp := time.Now()
|
||||
|
@@ -1593,7 +1593,7 @@ func (s *Sandbox) ResumeContainer(ctx context.Context, containerID string) error
|
||||
}
|
||||
|
||||
// createContainers registers all containers, create the
|
||||
// containers in the guest and starts one shim per container.
|
||||
// containers in the guest.
|
||||
func (s *Sandbox) createContainers(ctx context.Context) error {
|
||||
span, ctx := katatrace.Trace(ctx, s.Logger(), "createContainers", sandboxTracingTags, map[string]string{"sandbox_id": s.id})
|
||||
defer span.End()
|
||||
|
Reference in New Issue
Block a user