MCPcopy Index your code
hub / github.com/docker/cli / getExecExitStatus

Function getExecExitStatus

cli/command/container/exec.go:204–218  ·  view source on GitHub ↗
(ctx context.Context, apiClient client.ExecAPIClient, execID string)

Source from the content-addressed store, hash-verified

202}
203
204func getExecExitStatus(ctx context.Context, apiClient client.ExecAPIClient, execID string) error {
205 resp, err := apiClient.ExecInspect(ctx, execID, client.ExecInspectOptions{})
206 if err != nil {
207 // If we can't connect, then the daemon probably died.
208 if !client.IsErrConnectionFailed(err) {
209 return err
210 }
211 return cli.StatusError{StatusCode: -1}
212 }
213 status := resp.ExitCode
214 if status != 0 {
215 return cli.StatusError{StatusCode: status}
216 }
217 return nil
218}
219
220// parseExec parses the specified args for the specified command and generates
221// an ExecConfig from it.

Callers 2

TestGetExecExitStatusFunction · 0.85
interactiveExecFunction · 0.85

Calls 1

ExecInspectMethod · 0.80

Tested by 1

TestGetExecExitStatusFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…