We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 658d8a8 + 73ce671 commit 6a3adeeCopy full SHA for 6a3adee
lib/facter/agent_status_check.rb
@@ -31,7 +31,11 @@
31
socket_matches = Set.new(socket_state.scan(%r{ino:(\d+)}).flatten)
32
33
# Look for the pxp-agent process in the process table:
34
- cmdline_path = Dir.glob('/proc/[0-9]*/cmdline').find { |path| File.read(path).split("\0").first == '/opt/puppetlabs/puppet/bin/pxp-agent' }
+ cmdline_path = Dir.glob('/proc/[0-9]*/cmdline').find do |path|
35
+ File.read(path).split("\0").first == '/opt/puppetlabs/puppet/bin/pxp-agent'
36
+ rescue Errno::ENOENT
37
+ next
38
+ end
39
40
# If no match was found, then the connection to 8142 is not the pxp-agent process because it is not in the process table:
41
if cmdline_path.nil?
0 commit comments