{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/osquery/pulls/comments/62575579","id":62575579,"diff_hunk":"@@ -1,20 +1,124 @@\n /*\n- *  Copyright (c) 2014-present, Facebook, Inc.\n- *  All rights reserved.\n- *\n- *  This source code is licensed under the BSD-style license found in the\n- *  LICENSE file in the root directory of this source tree. An additional grant\n- *  of patent rights can be found in the PATENTS file in the same directory.\n- *\n- */\n+*  Copyright (c) 2014-present, Facebook, Inc.\n+*  All rights reserved.\n+*\n+*  This source code is licensed under the BSD-style license found in the\n+*  LICENSE file in the root directory of this source tree. An additional grant\n+*  of patent rights can be found in the PATENTS file in the same directory.\n+*\n+*/\n+\n+#ifdef WIN32\n+#define WIN32_LEAN_AND_MEAN\n+#include <Windows.h>\n+#include <Shlwapi.h>\n+#endif\n+\n+#include <memory>\n \n #include <gtest/gtest.h>\n \n #include <osquery/logger.h>\n \n+#include \"osquery/core/process.h\"\n #include \"osquery/core/test_util.h\"\n \n+#define OSQUERY_TESTS_MODULENAME  \"osquery_tests.exe\"\n+\n+char *self_exec_path = nullptr;\n+\n+const char *expected_worker_args[] = {","path":"osquery/main/tests.cpp","position":38,"original_position":38,"commit_id":"9995f2e04045de0217ea975363f069824f8e5ca3","original_commit_id":"6b76a49796dbce9104b7d9f4dce8f7ff76ab8b61","user":{"login":"theopolis","id":981645,"avatar_url":"https://avatars.githubusercontent.com/u/981645?v=3","gravatar_id":"","url":"https://api.github.com/users/theopolis","html_url":"https://github.com/theopolis","followers_url":"https://api.github.com/users/theopolis/followers","following_url":"https://api.github.com/users/theopolis/following{/other_user}","gists_url":"https://api.github.com/users/theopolis/gists{/gist_id}","starred_url":"https://api.github.com/users/theopolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theopolis/subscriptions","organizations_url":"https://api.github.com/users/theopolis/orgs","repos_url":"https://api.github.com/users/theopolis/repos","events_url":"https://api.github.com/users/theopolis/events{/privacy}","received_events_url":"https://api.github.com/users/theopolis/received_events","type":"User","site_admin":false},"body":"Why is this global?","created_at":"2016-05-09T21:23:07Z","updated_at":"2016-05-09T21:23:07Z","html_url":"https://github.com/facebook/osquery/pull/2069#discussion_r62575579","pull_request_url":"https://api.github.com/repos/facebook/osquery/pulls/2069","_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments/62575579"},"html":{"href":"https://github.com/facebook/osquery/pull/2069#discussion_r62575579"},"pull_request":{"href":"https://api.github.com/repos/facebook/osquery/pulls/2069"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/osquery/pulls/2069","id":68941342,"html_url":"https://github.com/facebook/osquery/pull/2069","diff_url":"https://github.com/facebook/osquery/pull/2069.diff","patch_url":"https://github.com/facebook/osquery/pull/2069.patch","issue_url":"https://api.github.com/repos/facebook/osquery/issues/2069","number":2069,"state":"open","locked":false,"title":"Process Operations - Pure Process Abstraction","user":{"login":"yying","id":4278185,"avatar_url":"https://avatars.githubusercontent.com/u/4278185?v=3","gravatar_id":"","url":"https://api.github.com/users/yying","html_url":"https://github.com/yying","followers_url":"https://api.github.com/users/yying/followers","following_url":"https://api.github.com/users/yying/following{/other_user}","gists_url":"https://api.github.com/users/yying/gists{/gist_id}","starred_url":"https://api.github.com/users/yying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yying/subscriptions","organizations_url":"https://api.github.com/users/yying/orgs","repos_url":"https://api.github.com/users/yying/repos","events_url":"https://api.github.com/users/yying/events{/privacy}","received_events_url":"https://api.github.com/users/yying/received_events","type":"User","site_admin":false},"body":"This is the first in a series of pull requests for process abstraction.\r\n\r\nThis pull request commits all of the process abstraction code with no integration with the current osquery build system. ","created_at":"2016-05-04T22:19:21Z","updated_at":"2016-05-09T21:23:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85609bc1124806dd91266c5d8594ac8cd517d1bc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/osquery/pulls/2069/commits","review_comments_url":"https://api.github.com/repos/facebook/osquery/pulls/2069/comments","review_comment_url":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/2069/comments","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/9995f2e04045de0217ea975363f069824f8e5ca3","head":{"label":"trailofbits:process-operations/pure-process-abstraction","ref":"process-operations/pure-process-abstraction","sha":"9995f2e04045de0217ea975363f069824f8e5ca3","user":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars.githubusercontent.com/u/2314423?v=3","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"repo":{"id":54419021,"name":"osquery","full_name":"trailofbits/osquery","owner":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars.githubusercontent.com/u/2314423?v=3","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trailofbits/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":true,"url":"https://api.github.com/repos/trailofbits/osquery","forks_url":"https://api.github.com/repos/trailofbits/osquery/forks","keys_url":"https://api.github.com/repos/trailofbits/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trailofbits/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trailofbits/osquery/teams","hooks_url":"https://api.github.com/repos/trailofbits/osquery/hooks","issue_events_url":"https://api.github.com/repos/trailofbits/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/trailofbits/osquery/events","assignees_url":"https://api.github.com/repos/trailofbits/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/trailofbits/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/trailofbits/osquery/tags","blobs_url":"https://api.github.com/repos/trailofbits/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trailofbits/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trailofbits/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/trailofbits/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trailofbits/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/trailofbits/osquery/languages","stargazers_url":"https://api.github.com/repos/trailofbits/osquery/stargazers","contributors_url":"https://api.github.com/repos/trailofbits/osquery/contributors","subscribers_url":"https://api.github.com/repos/trailofbits/osquery/subscribers","subscription_url":"https://api.github.com/repos/trailofbits/osquery/subscription","commits_url":"https://api.github.com/repos/trailofbits/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/trailofbits/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/trailofbits/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/trailofbits/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/trailofbits/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/trailofbits/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trailofbits/osquery/merges","archive_url":"https://api.github.com/repos/trailofbits/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trailofbits/osquery/downloads","issues_url":"https://api.github.com/repos/trailofbits/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/trailofbits/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/trailofbits/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/trailofbits/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trailofbits/osquery/labels{/name}","releases_url":"https://api.github.com/repos/trailofbits/osquery/releases{/id}","deployments_url":"https://api.github.com/repos/trailofbits/osquery/deployments","created_at":"2016-03-21T20:06:09Z","updated_at":"2016-03-21T20:06:11Z","pushed_at":"2016-05-09T21:18:58Z","git_url":"git://github.com/trailofbits/osquery.git","ssh_url":"git@github.com:trailofbits/osquery.git","clone_url":"https://github.com/trailofbits/osquery.git","svn_url":"https://github.com/trailofbits/osquery","homepage":"https://osquery.io","size":7990,"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":"facebook:master","ref":"master","sha":"9fd807df5485f88ee15ed558da31162063130c1d","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":22394357,"name":"osquery","full_name":"facebook/osquery","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":false,"url":"https://api.github.com/repos/facebook/osquery","forks_url":"https://api.github.com/repos/facebook/osquery/forks","keys_url":"https://api.github.com/repos/facebook/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/osquery/teams","hooks_url":"https://api.github.com/repos/facebook/osquery/hooks","issue_events_url":"https://api.github.com/repos/facebook/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/osquery/events","assignees_url":"https://api.github.com/repos/facebook/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/osquery/tags","blobs_url":"https://api.github.com/repos/facebook/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/osquery/languages","stargazers_url":"https://api.github.com/repos/facebook/osquery/stargazers","contributors_url":"https://api.github.com/repos/facebook/osquery/contributors","subscribers_url":"https://api.github.com/repos/facebook/osquery/subscribers","subscription_url":"https://api.github.com/repos/facebook/osquery/subscription","commits_url":"https://api.github.com/repos/facebook/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/osquery/merges","archive_url":"https://api.github.com/repos/facebook/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/osquery/downloads","issues_url":"https://api.github.com/repos/facebook/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/osquery/labels{/name}","releases_url":"https://api.github.com/repos/facebook/osquery/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/osquery/deployments","created_at":"2014-07-29T20:27:33Z","updated_at":"2016-05-09T16:39:02Z","pushed_at":"2016-05-09T21:18:59Z","git_url":"git://github.com/facebook/osquery.git","ssh_url":"git@github.com:facebook/osquery.git","clone_url":"https://github.com/facebook/osquery.git","svn_url":"https://github.com/facebook/osquery","homepage":"https://osquery.io","size":11372,"stargazers_count":6096,"watchers_count":6096,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":617,"mirror_url":null,"open_issues_count":62,"forks":617,"open_issues":62,"watchers":6096,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/2069"},"html":{"href":"https://github.com/facebook/osquery/pull/2069"},"issue":{"href":"https://api.github.com/repos/facebook/osquery/issues/2069"},"comments":{"href":"https://api.github.com/repos/facebook/osquery/issues/2069/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/osquery/pulls/2069/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/osquery/pulls/2069/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/osquery/statuses/9995f2e04045de0217ea975363f069824f8e5ca3"}}}}