{"action":"created","issue":{"url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/130","labels_url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/130/comments","events_url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/130/events","html_url":"https://github.com/d11wtq/dockerpty-restored-2/issues/130","id":107842177,"number":130,"title":"handle partial writes correctly","user":{"login":"d11wtq","id":37948,"avatar_url":"https://avatars.githubusercontent.com/u/37948?v=3","gravatar_id":"","url":"https://api.github.com/users/d11wtq","html_url":"https://github.com/d11wtq","followers_url":"https://api.github.com/users/d11wtq/followers","following_url":"https://api.github.com/users/d11wtq/following{/other_user}","gists_url":"https://api.github.com/users/d11wtq/gists{/gist_id}","starred_url":"https://api.github.com/users/d11wtq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d11wtq/subscriptions","organizations_url":"https://api.github.com/users/d11wtq/orgs","repos_url":"https://api.github.com/users/d11wtq/repos","events_url":"https://api.github.com/users/d11wtq/events{/privacy}","received_events_url":"https://api.github.com/users/d11wtq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-23T03:16:16Z","updated_at":"2015-09-23T03:16:29Z","closed_at":"2015-09-23T03:16:18Z","body":"#36 Issue by __zwily__, created on: 2015-04-22T19:47:36Z\n\nThis is an attempt to fix #26. os.write() does not guarantee that it\r\nwill write the entire string given. This change creates a buffer to\r\nstore the remainder of partial writes, and adds streams with pending\r\ndata to the main select loop so we can attempt to flush the data."},"comment":{"url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/comments/142479348","html_url":"https://github.com/d11wtq/dockerpty-restored-2/issues/130#issuecomment-142479348","issue_url":"https://api.github.com/repos/d11wtq/dockerpty-restored-2/issues/130","id":142479348,"user":{"login":"d11wtq","id":37948,"avatar_url":"https://avatars.githubusercontent.com/u/37948?v=3","gravatar_id":"","url":"https://api.github.com/users/d11wtq","html_url":"https://github.com/d11wtq","followers_url":"https://api.github.com/users/d11wtq/followers","following_url":"https://api.github.com/users/d11wtq/following{/other_user}","gists_url":"https://api.github.com/users/d11wtq/gists{/gist_id}","starred_url":"https://api.github.com/users/d11wtq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d11wtq/subscriptions","organizations_url":"https://api.github.com/users/d11wtq/orgs","repos_url":"https://api.github.com/users/d11wtq/repos","events_url":"https://api.github.com/users/d11wtq/events{/privacy}","received_events_url":"https://api.github.com/users/d11wtq/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T03:16:29Z","updated_at":"2015-09-23T03:16:29Z","body":"Comment by __zwily__, created on: 2015-04-23T13:46:56Z\n\n__aanand__ I can't replicate the hang. If I start a container with bash and let it idle for a few minutes, I can keep using it after that.\r\n\r\nI think the hang introduced in 6ded926 is because it was attempting to `flush()` every pump, even ones not ready to read. That could cause a `read` on an fd not ready for reading to hang. My change doesn't attempt to flush every pump on every loop, so that same hang shouldn't happen.\r\n\r\nHow did you do it?"}}