{"action":"created","comment":{"url":"https://api.github.com/repos/opencontainers/runc/pulls/comments/63597676","id":63597676,"diff_hunk":"@@ -240,7 +241,15 @@ func (r *runner) run(config *specs.Process) (int, error) {\n \t\t\treturn -1, err\n \t\t}\n \t}\n-\tif r.detach {\n+\tif !r.create {\n+\t\tif err := process.Signal(syscall.SIGCONT); err != nil {\n+\t\t\tr.terminate(process)\n+\t\t\tr.destroy()\n+\t\t\ttty.Close()\n+\t\t\treturn -1, err\n+\t\t}\n+\t}\n+\tif r.detach || r.create {","path":"utils_linux.go","position":30,"original_position":30,"commit_id":"572055dddd466279cc8c56c858b2bbd7e1f3fd3f","original_commit_id":"572055dddd466279cc8c56c858b2bbd7e1f3fd3f","user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"body":"On Tue, May 17, 2016 at 01:05:45PM -0700, Michael Crosby wrote:\n> Are you asking a question or what are you trying to get at? \n\nI'm trying to decide how you figure out the exit code for the\ncontainer process.  It sounds like you're saying:\n\n  “The runtime will not track or provide access to this information.\n  The process that called ‘create’ should setup its own wait to\n  collect that information and call ‘delete’.”\n\nwait(1p) is a fairly convenient way to do that from the shell, so I'm\nfine with this approach, but it is shifting that reap/cleanup\nfunctionality from the runtime (which used to handle it) to the\ncaller, so we probably want clear docs to this effect.\n","created_at":"2016-05-17T20:30:14Z","updated_at":"2016-05-17T20:30:14Z","html_url":"https://github.com/opencontainers/runc/pull/827#discussion_r63597676","pull_request_url":"https://api.github.com/repos/opencontainers/runc/pulls/827","_links":{"self":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/comments/63597676"},"html":{"href":"https://github.com/opencontainers/runc/pull/827#discussion_r63597676"},"pull_request":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/827"}}},"pull_request":{"url":"https://api.github.com/repos/opencontainers/runc/pulls/827","id":70276278,"html_url":"https://github.com/opencontainers/runc/pull/827","diff_url":"https://github.com/opencontainers/runc/pull/827.diff","patch_url":"https://github.com/opencontainers/runc/pull/827.patch","issue_url":"https://api.github.com/repos/opencontainers/runc/issues/827","number":827,"state":"open","locked":false,"title":"Implement create and start","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","gravatar_id":"","url":"https://api.github.com/users/crosbymichael","html_url":"https://github.com/crosbymichael","followers_url":"https://api.github.com/users/crosbymichael/followers","following_url":"https://api.github.com/users/crosbymichael/following{/other_user}","gists_url":"https://api.github.com/users/crosbymichael/gists{/gist_id}","starred_url":"https://api.github.com/users/crosbymichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosbymichael/subscriptions","organizations_url":"https://api.github.com/users/crosbymichael/orgs","repos_url":"https://api.github.com/users/crosbymichael/repos","events_url":"https://api.github.com/users/crosbymichael/events{/privacy}","received_events_url":"https://api.github.com/users/crosbymichael/received_events","type":"User","site_admin":false},"body":"This implements create and start in runc without the need for a unix socket or other complexity.  It implements it by blocking the init process waiting on a `SIGCONT` before the users process is started.  \r\n\r\nThis does not remove hooks, that can be done separately.  This also updates the libcontainer stats to correctly report if the container is created vs running(user code).  \r\n\r\nIt does not bind mount namespaces, if you want namespaces to be bind mounted then you can write code to bind them after `create` returns and before calling `start`.  \r\n\r\nIt retains the current functionality of `start` today by adding a `runc run` command that does the same workflow as today. ","created_at":"2016-05-16T23:06:31Z","updated_at":"2016-05-17T20:30:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aba652120909ff677828d54158f772a447ec4f6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencontainers/runc/pulls/827/commits","review_comments_url":"https://api.github.com/repos/opencontainers/runc/pulls/827/comments","review_comment_url":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencontainers/runc/issues/827/comments","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/572055dddd466279cc8c56c858b2bbd7e1f3fd3f","head":{"label":"crosbymichael:create-start","ref":"create-start","sha":"572055dddd466279cc8c56c858b2bbd7e1f3fd3f","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","gravatar_id":"","url":"https://api.github.com/users/crosbymichael","html_url":"https://github.com/crosbymichael","followers_url":"https://api.github.com/users/crosbymichael/followers","following_url":"https://api.github.com/users/crosbymichael/following{/other_user}","gists_url":"https://api.github.com/users/crosbymichael/gists{/gist_id}","starred_url":"https://api.github.com/users/crosbymichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosbymichael/subscriptions","organizations_url":"https://api.github.com/users/crosbymichael/orgs","repos_url":"https://api.github.com/users/crosbymichael/repos","events_url":"https://api.github.com/users/crosbymichael/events{/privacy}","received_events_url":"https://api.github.com/users/crosbymichael/received_events","type":"User","site_admin":false},"repo":{"id":38062262,"name":"runc","full_name":"crosbymichael/runc","owner":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","gravatar_id":"","url":"https://api.github.com/users/crosbymichael","html_url":"https://github.com/crosbymichael","followers_url":"https://api.github.com/users/crosbymichael/followers","following_url":"https://api.github.com/users/crosbymichael/following{/other_user}","gists_url":"https://api.github.com/users/crosbymichael/gists{/gist_id}","starred_url":"https://api.github.com/users/crosbymichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosbymichael/subscriptions","organizations_url":"https://api.github.com/users/crosbymichael/orgs","repos_url":"https://api.github.com/users/crosbymichael/repos","events_url":"https://api.github.com/users/crosbymichael/events{/privacy}","received_events_url":"https://api.github.com/users/crosbymichael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crosbymichael/runc","description":"runc container cli tools","fork":true,"url":"https://api.github.com/repos/crosbymichael/runc","forks_url":"https://api.github.com/repos/crosbymichael/runc/forks","keys_url":"https://api.github.com/repos/crosbymichael/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crosbymichael/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crosbymichael/runc/teams","hooks_url":"https://api.github.com/repos/crosbymichael/runc/hooks","issue_events_url":"https://api.github.com/repos/crosbymichael/runc/issues/events{/number}","events_url":"https://api.github.com/repos/crosbymichael/runc/events","assignees_url":"https://api.github.com/repos/crosbymichael/runc/assignees{/user}","branches_url":"https://api.github.com/repos/crosbymichael/runc/branches{/branch}","tags_url":"https://api.github.com/repos/crosbymichael/runc/tags","blobs_url":"https://api.github.com/repos/crosbymichael/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crosbymichael/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crosbymichael/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/crosbymichael/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crosbymichael/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/crosbymichael/runc/languages","stargazers_url":"https://api.github.com/repos/crosbymichael/runc/stargazers","contributors_url":"https://api.github.com/repos/crosbymichael/runc/contributors","subscribers_url":"https://api.github.com/repos/crosbymichael/runc/subscribers","subscription_url":"https://api.github.com/repos/crosbymichael/runc/subscription","commits_url":"https://api.github.com/repos/crosbymichael/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/crosbymichael/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/crosbymichael/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/crosbymichael/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/crosbymichael/runc/contents/{+path}","compare_url":"https://api.github.com/repos/crosbymichael/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crosbymichael/runc/merges","archive_url":"https://api.github.com/repos/crosbymichael/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crosbymichael/runc/downloads","issues_url":"https://api.github.com/repos/crosbymichael/runc/issues{/number}","pulls_url":"https://api.github.com/repos/crosbymichael/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/crosbymichael/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/crosbymichael/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crosbymichael/runc/labels{/name}","releases_url":"https://api.github.com/repos/crosbymichael/runc/releases{/id}","deployments_url":"https://api.github.com/repos/crosbymichael/runc/deployments","created_at":"2015-06-25T16:59:57Z","updated_at":"2016-02-20T12:32:13Z","pushed_at":"2016-05-17T00:47:47Z","git_url":"git://github.com/crosbymichael/runc.git","ssh_url":"git@github.com:crosbymichael/runc.git","clone_url":"https://github.com/crosbymichael/runc.git","svn_url":"https://github.com/crosbymichael/runc","homepage":"","size":3130,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"opencontainers:master","ref":"master","sha":"f0ec80b93c7b7ae9549d1ecd2ca870873f329656","user":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":36960321,"name":"runc","full_name":"opencontainers/runc","owner":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencontainers/runc","description":"runc container cli tools","fork":false,"url":"https://api.github.com/repos/opencontainers/runc","forks_url":"https://api.github.com/repos/opencontainers/runc/forks","keys_url":"https://api.github.com/repos/opencontainers/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencontainers/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencontainers/runc/teams","hooks_url":"https://api.github.com/repos/opencontainers/runc/hooks","issue_events_url":"https://api.github.com/repos/opencontainers/runc/issues/events{/number}","events_url":"https://api.github.com/repos/opencontainers/runc/events","assignees_url":"https://api.github.com/repos/opencontainers/runc/assignees{/user}","branches_url":"https://api.github.com/repos/opencontainers/runc/branches{/branch}","tags_url":"https://api.github.com/repos/opencontainers/runc/tags","blobs_url":"https://api.github.com/repos/opencontainers/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencontainers/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencontainers/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencontainers/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/opencontainers/runc/languages","stargazers_url":"https://api.github.com/repos/opencontainers/runc/stargazers","contributors_url":"https://api.github.com/repos/opencontainers/runc/contributors","subscribers_url":"https://api.github.com/repos/opencontainers/runc/subscribers","subscription_url":"https://api.github.com/repos/opencontainers/runc/subscription","commits_url":"https://api.github.com/repos/opencontainers/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencontainers/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencontainers/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencontainers/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencontainers/runc/contents/{+path}","compare_url":"https://api.github.com/repos/opencontainers/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencontainers/runc/merges","archive_url":"https://api.github.com/repos/opencontainers/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencontainers/runc/downloads","issues_url":"https://api.github.com/repos/opencontainers/runc/issues{/number}","pulls_url":"https://api.github.com/repos/opencontainers/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/opencontainers/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/opencontainers/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencontainers/runc/labels{/name}","releases_url":"https://api.github.com/repos/opencontainers/runc/releases{/id}","deployments_url":"https://api.github.com/repos/opencontainers/runc/deployments","created_at":"2015-06-05T23:30:45Z","updated_at":"2016-05-17T17:22:53Z","pushed_at":"2016-05-17T12:16:01Z","git_url":"git://github.com/opencontainers/runc.git","ssh_url":"git@github.com:opencontainers/runc.git","clone_url":"https://github.com/opencontainers/runc.git","svn_url":"https://github.com/opencontainers/runc","homepage":"https://www.opencontainers.org/","size":5455,"stargazers_count":2770,"watchers_count":2770,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":355,"mirror_url":null,"open_issues_count":70,"forks":355,"open_issues":70,"watchers":2770,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/827"},"html":{"href":"https://github.com/opencontainers/runc/pull/827"},"issue":{"href":"https://api.github.com/repos/opencontainers/runc/issues/827"},"comments":{"href":"https://api.github.com/repos/opencontainers/runc/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/opencontainers/runc/statuses/572055dddd466279cc8c56c858b2bbd7e1f3fd3f"}}}}