Skip to content

StartExec does not wait for process to finish if stdout/stderr not passed in #838

Description

@zombiezen

Calling StartExec (even without Detach: true) will not wait until the process finishes if stdout/stderr are not passed in. IIUC the problem is this branch:

go-dockerclient/client.go

Lines 793 to 794 in fa0591b

if hijackOptions.stdout == nil && hijackOptions.stderr == nil {
close(errChanOut)

I believe the fix is to always use ioutil.Discard for stdout/stderr and synchronize on the streams closing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions