{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/93675359","pull_request_review_id":14208553,"id":93675359,"diff_hunk":"@@ -17,20 +17,36 @@ limitations under the License.\n #include <signal.h>\n #include <stdio.h>\n #include <stdlib.h>\n+#include <sys/types.h>\n+#include <sys/wait.h>\n #include <unistd.h>\n \n static void sigdown(int signo) {\n-\tpsignal(signo, \"shutting down, got signal\");\n-\texit(0);\n+  psignal(signo, \"Shutting down, got signal\");\n+  exit(0);\n+}\n+\n+static void sigreap(int signo) {\n+  while (waitpid(-1, NULL, WNOHANG) > 0)\n+    ;\n }\n \n int main() {\n-\tif (signal(SIGINT, sigdown) == SIG_ERR)\n-\t\treturn 1;\n-\tif (signal(SIGTERM, sigdown) == SIG_ERR)\n-\t\treturn 2;\n-\tsignal(SIGKILL, sigdown);\n-\tfor (;;) pause();\n-\tfprintf(stderr, \"error: infinite loop terminated\\n\");\n-\treturn 42;\n+  if (getpid() != 1)\n+    fprintf(stderr, \"Warning: pause should be the first process in a pod\\n\");","path":"build/pause/pause.c","position":30,"original_position":30,"commit_id":"7910a3f315b89747b1a9a0bc8e74ae390f877001","original_commit_id":"7910a3f315b89747b1a9a0bc8e74ae390f877001","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"but I guess a code comment would help :-)","created_at":"2016-12-22T18:41:22Z","updated_at":"2016-12-22T18:41:22Z","html_url":"https://github.com/kubernetes/kubernetes/pull/36853#discussion_r93675359","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/93675359"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/36853#discussion_r93675359"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853","id":93873468,"html_url":"https://github.com/kubernetes/kubernetes/pull/36853","diff_url":"https://github.com/kubernetes/kubernetes/pull/36853.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/36853.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36853","number":36853,"state":"open","locked":false,"title":"Add SIGCHLD handler to pause container","user":{"login":"verb","id":458800,"avatar_url":"https://avatars.githubusercontent.com/u/458800?v=3","gravatar_id":"","url":"https://api.github.com/users/verb","html_url":"https://github.com/verb","followers_url":"https://api.github.com/users/verb/followers","following_url":"https://api.github.com/users/verb/following{/other_user}","gists_url":"https://api.github.com/users/verb/gists{/gist_id}","starred_url":"https://api.github.com/users/verb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verb/subscriptions","organizations_url":"https://api.github.com/users/verb/orgs","repos_url":"https://api.github.com/users/verb/repos","events_url":"https://api.github.com/users/verb/events{/privacy}","received_events_url":"https://api.github.com/users/verb/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**: This allows pause to reap orphaned zombies in a shared PID namespace. (#1615)\r\n\r\n**Special notes for your reviewer**: I plan to discuss this with SIG Node to ensure compatibility with future runtimes.\r\n\r\n**Release note**: This will have no effect until shared PID namespace is enabled, so recommend release-note-none.\r\n\r\nThis allows pause to reap zombies in the upcoming Shared PID namespace\r\n(#1615). Uses the better defined sigaction() instead of signal() for all\r\nsignals both for consistency (SIGCHLD handler avoids SA_RESTART) and to\r\navoid the implicit signal()->sigaction() translation of various libc\r\nversions.\r\n\r\nAlso makes warnings errors and includes a tool to make orphaned zombies\r\nfor manual testing.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/36853)\n<!-- Reviewable:end -->\n","created_at":"2016-11-15T23:47:47Z","updated_at":"2016-12-22T18:41:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1ee308ff6d262a422e553b644dfb1e062053e67","assignee":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"assignees":[{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/31","html_url":"https://github.com/kubernetes/kubernetes/milestone/31","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/31/labels","id":2130587,"number":31,"title":"v1.6","description":null,"creator":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"open_issues":215,"closed_issues":130,"state":"open","created_at":"2016-11-12T00:35:38Z","updated_at":"2016-12-22T06:54:53Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36853/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7910a3f315b89747b1a9a0bc8e74ae390f877001","head":{"label":"verb:init","ref":"init","sha":"7910a3f315b89747b1a9a0bc8e74ae390f877001","user":{"login":"verb","id":458800,"avatar_url":"https://avatars.githubusercontent.com/u/458800?v=3","gravatar_id":"","url":"https://api.github.com/users/verb","html_url":"https://github.com/verb","followers_url":"https://api.github.com/users/verb/followers","following_url":"https://api.github.com/users/verb/following{/other_user}","gists_url":"https://api.github.com/users/verb/gists{/gist_id}","starred_url":"https://api.github.com/users/verb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verb/subscriptions","organizations_url":"https://api.github.com/users/verb/orgs","repos_url":"https://api.github.com/users/verb/repos","events_url":"https://api.github.com/users/verb/events{/privacy}","received_events_url":"https://api.github.com/users/verb/received_events","type":"User","site_admin":false},"repo":{"id":43977755,"name":"kubernetes","full_name":"verb/kubernetes","owner":{"login":"verb","id":458800,"avatar_url":"https://avatars.githubusercontent.com/u/458800?v=3","gravatar_id":"","url":"https://api.github.com/users/verb","html_url":"https://github.com/verb","followers_url":"https://api.github.com/users/verb/followers","following_url":"https://api.github.com/users/verb/following{/other_user}","gists_url":"https://api.github.com/users/verb/gists{/gist_id}","starred_url":"https://api.github.com/users/verb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verb/subscriptions","organizations_url":"https://api.github.com/users/verb/orgs","repos_url":"https://api.github.com/users/verb/repos","events_url":"https://api.github.com/users/verb/events{/privacy}","received_events_url":"https://api.github.com/users/verb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/verb/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/verb/kubernetes","forks_url":"https://api.github.com/repos/verb/kubernetes/forks","keys_url":"https://api.github.com/repos/verb/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verb/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verb/kubernetes/teams","hooks_url":"https://api.github.com/repos/verb/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/verb/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/verb/kubernetes/events","assignees_url":"https://api.github.com/repos/verb/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/verb/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/verb/kubernetes/tags","blobs_url":"https://api.github.com/repos/verb/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verb/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verb/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/verb/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verb/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/verb/kubernetes/languages","stargazers_url":"https://api.github.com/repos/verb/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/verb/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/verb/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/verb/kubernetes/subscription","commits_url":"https://api.github.com/repos/verb/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/verb/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/verb/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/verb/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/verb/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/verb/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verb/kubernetes/merges","archive_url":"https://api.github.com/repos/verb/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verb/kubernetes/downloads","issues_url":"https://api.github.com/repos/verb/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/verb/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/verb/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/verb/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verb/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/verb/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/verb/kubernetes/deployments","created_at":"2015-10-09T20:10:06Z","updated_at":"2016-07-14T22:46:51Z","pushed_at":"2016-12-21T21:23:34Z","git_url":"git://github.com/verb/kubernetes.git","ssh_url":"git@github.com:verb/kubernetes.git","clone_url":"https://github.com/verb/kubernetes.git","svn_url":"https://github.com/verb/kubernetes","homepage":"http://kubernetes.io","size":366048,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"15059e6a5b3298644d94563ab48096a65a70af58","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-12-22T18:13:37Z","pushed_at":"2016-12-22T18:39:46Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":480238,"stargazers_count":19418,"watchers_count":19418,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6508,"mirror_url":null,"open_issues_count":5461,"forks":6508,"open_issues":5461,"watchers":19418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/36853"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/36853"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/36853/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36853/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7910a3f315b89747b1a9a0bc8e74ae390f877001"}}}}
{"actor":{"display_login":"jonboulle"}}