{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/120407695","pull_request_review_id":42368053,"id":120407695,"diff_hunk":"@@ -188,18 +188,69 @@ def self.execute(command, options = NoOptionsSpecified)\n \n     begin\n       stdin = Puppet::FileSystem.open(options[:stdinfile] || null_file, nil, 'r')\n-      stdout = options[:squelch] ? Puppet::FileSystem.open(null_file, nil, 'w') : Puppet::FileSystem::Uniquefile.new('puppet')\n+      # On Windows, continue to use the file-based approach to avoid breaking people's existing\n+      # manifests. If they use a script that doesn't background cleanly, such as\n+      # `start /b ping 127.0.0.1`, we couldn't handle it with pipes as there's no non-blocking\n+      # read available.\n+      if options[:squelch]\n+        stdout = Puppet::FileSystem.open(null_file, nil, 'w')","path":"lib/puppet/util/execution.rb","position":10,"original_position":10,"commit_id":"36daa64fcedd3f3b6ff53847d10e79968a04c0b8","original_commit_id":"a7ed054242763c16edea6bf890fd374d72d80679","user":{"login":"mruzicka","id":562920,"avatar_url":"https://avatars3.githubusercontent.com/u/562920?v=3","gravatar_id":"","url":"https://api.github.com/users/mruzicka","html_url":"https://github.com/mruzicka","followers_url":"https://api.github.com/users/mruzicka/followers","following_url":"https://api.github.com/users/mruzicka/following{/other_user}","gists_url":"https://api.github.com/users/mruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/mruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruzicka/subscriptions","organizations_url":"https://api.github.com/users/mruzicka/orgs","repos_url":"https://api.github.com/users/mruzicka/repos","events_url":"https://api.github.com/users/mruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/mruzicka/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2017-06-06T16:15:57Z","updated_at":"2017-06-06T16:15:57Z","html_url":"https://github.com/puppetlabs/puppet/pull/5872#discussion_r120407695","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/120407695"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/5872#discussion_r120407695"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872","id":120698585,"html_url":"https://github.com/puppetlabs/puppet/pull/5872","diff_url":"https://github.com/puppetlabs/puppet/pull/5872.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/5872.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/5872","number":5872,"state":"open","locked":false,"title":"(PUP-6675) Use pipes instead of temporary files for Puppet exec","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars3.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"body":"Under selinux, when Puppet is invoked by another process with\r\nreduced privileges, any sub-programs invoked by Puppet will not\r\ninherit Puppet's selinux priveleges. This specifically causes silent\r\nfailures when invoking applications that don't normally have the\r\nability to write files - such as iptables-save or hostname -\r\nbecause Puppet redirects their output to a temporary file.\r\n\r\nUse pipes instead of a temporary file to capture the output of\r\nsubprocesses on POSIX systems. Poorly behaved scripts need special\r\nhandling, as a plain foo & will inherit stdout and not close it.\r\nRead from the pipe without requiring EOF.\r\n\r\nOn Windows, we retain the old file-based IO to avoid breaking poorly\r\nwritten scripts - start /b ping 127.0.0.1 captures stdout - and to\r\nretain the current behavior when Puppet is terminated - a new Puppet run\r\ncan start even if a subprocess was left running by the prior process.","created_at":"2017-05-15T21:26:58Z","updated_at":"2017-06-06T16:15:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce527098b8bfe59cc6777547e54586ed8f31e771","assignee":null,"assignees":[],"requested_reviewers":[{"login":"joshcooper","id":737664,"avatar_url":"https://avatars2.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/5872/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/36daa64fcedd3f3b6ff53847d10e79968a04c0b8","head":{"label":"puppetlabs:revert-5871-revert-5870-PUP-6675","ref":"revert-5871-revert-5870-PUP-6675","sha":"36daa64fcedd3f3b6ff53847d10e79968a04c0b8","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars3.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars3.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2017-06-06T04:05:43Z","pushed_at":"2017-06-06T12:26:41Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":56870,"stargazers_count":4497,"watchers_count":4497,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1853,"mirror_url":null,"open_issues_count":68,"forks":1853,"open_issues":68,"watchers":4497,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"78e175e6e353a23d62bc79aab36c322ec5af4e2f","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars3.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars3.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2017-06-06T04:05:43Z","pushed_at":"2017-06-06T12:26:41Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":56870,"stargazers_count":4497,"watchers_count":4497,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1853,"mirror_url":null,"open_issues_count":68,"forks":1853,"open_issues":68,"watchers":4497,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/5872"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/5872"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/5872/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5872/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/36daa64fcedd3f3b6ff53847d10e79968a04c0b8"}}}}
{"actor":{"display_login":"mruzicka"}}