{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/13052","labels_url":"https://api.github.com/repos/docker/docker/issues/13052/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/13052/comments","events_url":"https://api.github.com/repos/docker/docker/issues/13052/events","html_url":"https://github.com/docker/docker/issues/13052","id":73979044,"number":13052,"title":"docker exec does not exit when container process terminates","user":{"login":"bendenoz","id":3428395,"avatar_url":"https://avatars.githubusercontent.com/u/3428395?v=3","gravatar_id":"","url":"https://api.github.com/users/bendenoz","html_url":"https://github.com/bendenoz","followers_url":"https://api.github.com/users/bendenoz/followers","following_url":"https://api.github.com/users/bendenoz/following{/other_user}","gists_url":"https://api.github.com/users/bendenoz/gists{/gist_id}","starred_url":"https://api.github.com/users/bendenoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendenoz/subscriptions","organizations_url":"https://api.github.com/users/bendenoz/orgs","repos_url":"https://api.github.com/users/bendenoz/repos","events_url":"https://api.github.com/users/bendenoz/events{/privacy}","received_events_url":"https://api.github.com/users/bendenoz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-05-07T13:01:53Z","updated_at":"2015-12-17T01:39:54Z","closed_at":"2015-05-23T09:19:03Z","body":"Description of problem:\r\n----\r\n\r\n```docker exec``` does not exit when the container process terminates.\r\nThis only happens when running in **interactive** but no with **no tty**.\r\n\r\nie: \r\n```bash\r\ndocker exec -i <container> ps\r\n```\r\nhangs until Ctrl-C or Enter is pressed. It seems and input from STDIN is necessary for it to check the process state...\r\n\r\nit works fine with ```docker exec -it <container> ps``` and ```docker exec <container> ps```\r\n\r\nThis is an issue when using it to run rsync or scp command through an ssh tunnel (key based forced commands). the sync / copy works fine but never exits...\r\n\r\n**`docker version`:**\r\n\r\n\r\n```\r\nClient version: 1.6.0\r\nClient API version: 1.18\r\nGo version (client): go1.4.2\r\nGit commit (client): 4749651\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.6.0\r\nServer API version: 1.18\r\nGo version (server): go1.4.2\r\nGit commit (server): 4749651\r\nOS/Arch (server): linux/amd64\r\n```\r\ntested on 1.5 too\r\n\r\n**`docker info`:**\r\n\r\n```\r\nContainers: 6\r\nImages: 100\r\nStorage Driver: devicemapper\r\n Pool Name: docker-202:81-917511-pool\r\n Pool Blocksize: 65.54 kB\r\n Backing Filesystem: extfs\r\n Data file:\r\n Metadata file:\r\n Data Space Used: 3.734 GB\r\n Data Space Total: 107.4 GB\r\n Data Space Available: 103.6 GB\r\n Metadata Space Used: 5.931 MB\r\n Metadata Space Total: 2.147 GB\r\n Metadata Space Available: 2.142 GB\r\n Udev Sync Supported: false\r\n Library Version: 1.02.82-git (2013-10-04)\r\nExecution Driver: native-0.2\r\nKernel Version: 3.13.0-44-generic\r\nOperating System: Ubuntu 14.04.1 LTS\r\nCPUs: 1\r\nTotal Memory: 3.676 GiB\r\nName: docker1\r\nID: 645K:6725:O2Y7:Q5R4:5COY:353S:PX64:BUYO:6RTN:5YUS:R54G:QCDF\r\nWARNING: No swap limit support\r\n```\r\n\r\n**`uname -a`:**\r\n\r\n\r\n```\r\nLinux docker1 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux\r\n````\r\n\r\nSteps to Reproduce:\r\n----\r\n\r\n```docker exec -i <container> ps```\r\n\r\nActual Results:\r\n----\r\n\r\nprocess does not exit\r\n\r\nExpected Results:\r\n----\r\n\r\nprocess exits (returns to prompt)\r\n\r\nAdditional info:\r\n----\r\nhangs until Ctrl-C or Enter is pressed. It seems and input from STDIN is necessary for it to check the process state...\r\n\r\nit works fine with ```docker exec -it <container> ps``` and ```docker exec <container> ps```\r\n\r\nThis is an issue when using it to run rsync or scp command through an ssh tunnel (key based forced commands). the sync / copy works fine but never exits..."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/165310334","html_url":"https://github.com/docker/docker/issues/13052#issuecomment-165310334","issue_url":"https://api.github.com/repos/docker/docker/issues/13052","id":165310334,"user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T01:39:54Z","updated_at":"2015-12-17T01:39:54Z","body":"@glyph Correct, this was fixed in swarm 1.0... possibly 1.0.1 for TLS conns."}}