{"action":"created","comment":{"url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/comments/86115023","pull_request_review_id":6788643,"id":86115023,"diff_hunk":"@@ -0,0 +1,146 @@\n+// Copyright (c) 2016 Intel Corporation\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#include <stdlib.h>\n+#include <fcntl.h>\n+#include <stdint.h>\n+#include <inttypes.h>\n+#include <string.h>\n+#include <errno.h>\n+#include <signal.h>\n+\n+#include \"log.h\"\n+#include \"utils.h\"\n+\n+/* Signals that should be forwarded by the shim.\n+ * Commented out signals are handled by the default signal handler\n+ * as it is appropriate for those signals to be handle by the default handler.\n+ */\n+int shim_signal_table[] = {\n+\tSIGHUP,              /* Hangup */\n+\tSIGINT,              /* Interrupt */\n+\t//SIGQUIT,           /* Quit */\n+\t//SIGILL,            /* Illegal instruction */\n+\tSIGTRAP,             /* Trace Trap */\n+\t//SIGABRT,           /* Abort */\n+\tSIGIOT,              /* IOT trap  */\n+\t//SIGBUS,            /* BUS error */\n+\t//SIGFPE,            /* Floating-point exception  */\n+\t//SIGKILL,           /* Kill, unblockable */\n+\tSIGUSR1,             /* User-defined signal 1  */\n+\t//SIGSEGV,           /* Segmentation violation  */\n+\tSIGUSR2,             /* User-defined signal 2  */\n+\t//SIGPIPE,           /* Broken pipe */\n+\tSIGALRM,             /* Alarm clock */\n+\tSIGTERM,             /* Termination */\n+\tSIGSTKFLT,           /* Stack fault  */\n+\tSIGCLD,              /* Same as SIGCHLD */\n+\tSIGCHLD,             /* Child status has changed */\n+\tSIGCONT,             /* Continue */\n+\t//SIGSTOP,           /* Stop, unblockable */\n+\tSIGTSTP,             /* Keyboard stop */\n+\tSIGTTIN,             /* Background read from tty */\n+\tSIGTTOU,             /* Background write to tty */\n+\tSIGURG,              /* Urgent condition on socket */\n+\tSIGXCPU,             /* CPU limit exceeded */\n+\tSIGXFSZ,             /* File size limit exceeded */\n+\tSIGVTALRM,           /* Virtual alarm clock */\n+\tSIGPROF,             /* Profiling alarm clock */\n+\tSIGWINCH,            /* Window size change */\n+\tSIGPOLL,             /* Pollable event occurred */\n+\tSIGIO,               /* I/O now possible */\n+\tSIGPWR,              /* Power failure restart */\n+\t//SIGSYS,            /* Bad system call */\n+\tSIGUNUSED,\n+\t0,\n+};\n+\n+/*!\n+ * Set file descriptor as non-blocking\n+ *\n+ * \\param fd File descriptor to set as non-blocking\n+ */","path":"shim/utils.c","position":73,"original_position":73,"commit_id":"b919ebcea18aefcf7b65c163034751fdec0fe6ec","original_commit_id":"b919ebcea18aefcf7b65c163034751fdec0fe6ec","user":{"login":"jodh-intel","id":20315601,"avatar_url":"https://avatars.githubusercontent.com/u/20315601?v=3","gravatar_id":"","url":"https://api.github.com/users/jodh-intel","html_url":"https://github.com/jodh-intel","followers_url":"https://api.github.com/users/jodh-intel/followers","following_url":"https://api.github.com/users/jodh-intel/following{/other_user}","gists_url":"https://api.github.com/users/jodh-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/jodh-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodh-intel/subscriptions","organizations_url":"https://api.github.com/users/jodh-intel/orgs","repos_url":"https://api.github.com/users/jodh-intel/repos","events_url":"https://api.github.com/users/jodh-intel/events{/privacy}","received_events_url":"https://api.github.com/users/jodh-intel/received_events","type":"User","site_admin":false},"body":"Missing `\\return` comment.","created_at":"2016-11-02T10:53:10Z","updated_at":"2016-11-02T10:53:10Z","html_url":"https://github.com/01org/cc-oci-runtime/pull/362#discussion_r86115023","pull_request_url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362","_links":{"self":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/comments/86115023"},"html":{"href":"https://github.com/01org/cc-oci-runtime/pull/362#discussion_r86115023"},"pull_request":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362"}}},"pull_request":{"url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362","id":91839079,"html_url":"https://github.com/01org/cc-oci-runtime/pull/362","diff_url":"https://github.com/01org/cc-oci-runtime/pull/362.diff","patch_url":"https://github.com/01org/cc-oci-runtime/pull/362.patch","issue_url":"https://api.github.com/repos/01org/cc-oci-runtime/issues/362","number":362,"state":"open","locked":false,"title":"Shim implementation for master","user":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars.githubusercontent.com/u/7132811?v=3","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-01T18:37:43Z","updated_at":"2016-11-02T10:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6fae5fa3eeee881ee46e0a813acc5d1d4f77ac5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362/commits","review_comments_url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362/comments","review_comment_url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/cc-oci-runtime/issues/362/comments","statuses_url":"https://api.github.com/repos/01org/cc-oci-runtime/statuses/b919ebcea18aefcf7b65c163034751fdec0fe6ec","head":{"label":"amshinde:re-arch-ccshim2","ref":"re-arch-ccshim2","sha":"b919ebcea18aefcf7b65c163034751fdec0fe6ec","user":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars.githubusercontent.com/u/7132811?v=3","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"repo":{"id":64413846,"name":"cc-oci-runtime-1","full_name":"amshinde/cc-oci-runtime-1","owner":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars.githubusercontent.com/u/7132811?v=3","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amshinde/cc-oci-runtime-1","description":"OCI (Open Containers Initiative) compatible runtime","fork":true,"url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1","forks_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/forks","keys_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/teams","hooks_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/hooks","issue_events_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/issues/events{/number}","events_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/events","assignees_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/assignees{/user}","branches_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/branches{/branch}","tags_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/tags","blobs_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/statuses/{sha}","languages_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/languages","stargazers_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/stargazers","contributors_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/contributors","subscribers_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/subscribers","subscription_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/subscription","commits_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/contents/{+path}","compare_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/merges","archive_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/downloads","issues_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/issues{/number}","pulls_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/pulls{/number}","milestones_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/milestones{/number}","notifications_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/labels{/name}","releases_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/releases{/id}","deployments_url":"https://api.github.com/repos/amshinde/cc-oci-runtime-1/deployments","created_at":"2016-07-28T17:09:32Z","updated_at":"2016-07-28T17:09:33Z","pushed_at":"2016-11-01T18:21:18Z","git_url":"git://github.com/amshinde/cc-oci-runtime-1.git","ssh_url":"git@github.com:amshinde/cc-oci-runtime-1.git","clone_url":"https://github.com/amshinde/cc-oci-runtime-1.git","svn_url":"https://github.com/amshinde/cc-oci-runtime-1","homepage":"","size":1318,"stargazers_count":0,"watchers_count":0,"language":"C","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":"01org:master","ref":"master","sha":"954563863a4b6edb1541667c87db5debc1452744","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":62701840,"name":"cc-oci-runtime","full_name":"01org/cc-oci-runtime","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/cc-oci-runtime","description":"OCI (Open Containers Initiative) compatible runtime for Intel® Architecture","fork":false,"url":"https://api.github.com/repos/01org/cc-oci-runtime","forks_url":"https://api.github.com/repos/01org/cc-oci-runtime/forks","keys_url":"https://api.github.com/repos/01org/cc-oci-runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/cc-oci-runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/cc-oci-runtime/teams","hooks_url":"https://api.github.com/repos/01org/cc-oci-runtime/hooks","issue_events_url":"https://api.github.com/repos/01org/cc-oci-runtime/issues/events{/number}","events_url":"https://api.github.com/repos/01org/cc-oci-runtime/events","assignees_url":"https://api.github.com/repos/01org/cc-oci-runtime/assignees{/user}","branches_url":"https://api.github.com/repos/01org/cc-oci-runtime/branches{/branch}","tags_url":"https://api.github.com/repos/01org/cc-oci-runtime/tags","blobs_url":"https://api.github.com/repos/01org/cc-oci-runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/cc-oci-runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/cc-oci-runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/cc-oci-runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/cc-oci-runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/cc-oci-runtime/languages","stargazers_url":"https://api.github.com/repos/01org/cc-oci-runtime/stargazers","contributors_url":"https://api.github.com/repos/01org/cc-oci-runtime/contributors","subscribers_url":"https://api.github.com/repos/01org/cc-oci-runtime/subscribers","subscription_url":"https://api.github.com/repos/01org/cc-oci-runtime/subscription","commits_url":"https://api.github.com/repos/01org/cc-oci-runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/cc-oci-runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/cc-oci-runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/cc-oci-runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/cc-oci-runtime/contents/{+path}","compare_url":"https://api.github.com/repos/01org/cc-oci-runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/cc-oci-runtime/merges","archive_url":"https://api.github.com/repos/01org/cc-oci-runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/cc-oci-runtime/downloads","issues_url":"https://api.github.com/repos/01org/cc-oci-runtime/issues{/number}","pulls_url":"https://api.github.com/repos/01org/cc-oci-runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/cc-oci-runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/cc-oci-runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/cc-oci-runtime/labels{/name}","releases_url":"https://api.github.com/repos/01org/cc-oci-runtime/releases{/id}","deployments_url":"https://api.github.com/repos/01org/cc-oci-runtime/deployments","created_at":"2016-07-06T07:48:26Z","updated_at":"2016-10-31T14:24:27Z","pushed_at":"2016-11-01T23:08:48Z","git_url":"git://github.com/01org/cc-oci-runtime.git","ssh_url":"git@github.com:01org/cc-oci-runtime.git","clone_url":"https://github.com/01org/cc-oci-runtime.git","svn_url":"https://github.com/01org/cc-oci-runtime","homepage":"","size":1402,"stargazers_count":21,"watchers_count":21,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":120,"forks":13,"open_issues":120,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362"},"html":{"href":"https://github.com/01org/cc-oci-runtime/pull/362"},"issue":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/issues/362"},"comments":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/01org/cc-oci-runtime/statuses/b919ebcea18aefcf7b65c163034751fdec0fe6ec"}}}}
{"actor":{"display_login":"jodh-intel"}}