mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Do not start a ContainerExec twice
ContainerExecStart and ContainerExecAttach both call the /exec/id/start API endpoint. PiperOrigin-RevId: 344946627
This commit is contained in:
@@ -77,11 +77,6 @@ func (c *Container) doExec(ctx context.Context, r ExecOpts, args []string) (Proc
|
||||
return Process{}, fmt.Errorf("exec attach failed with err: %v", err)
|
||||
}
|
||||
|
||||
if err := c.client.ContainerExecStart(ctx, resp.ID, types.ExecStartCheck{}); err != nil {
|
||||
hijack.Close()
|
||||
return Process{}, fmt.Errorf("exec start failed with err: %v", err)
|
||||
}
|
||||
|
||||
return Process{
|
||||
container: c,
|
||||
execid: resp.ID,
|
||||
|
||||
Reference in New Issue
Block a user