Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on OSX #29

Open
shmul opened this issue Jun 29, 2016 · 1 comment
Open

Failure on OSX #29

shmul opened this issue Jun 29, 2016 · 1 comment

Comments

@shmul
Copy link

shmul commented Jun 29, 2016

Hi,

Just tried to run version 1.0.0 on OSX (check-process.rb -p redis) and it immediately failed with
Check failed to run: undefined method 'exitstatus' for nil:NilClass, ["/Library/Ruby/Gems/2.0.0/gems/sensu-plugins-process-checks-1.0.0/bin/check-process.rb:205 ...

I simply added $CHILD_STATUS && to the check.

def on_cygwin?
    # #YELLOW
    `ps -W 2>&1`; $CHILD_STATUS && $CHILD_STATUS.exitstatus == 0 # rubocop:disable Semicolon
  end

Not really worth a pull request :)

Cheers,
Shmul

@thisisjaid
Copy link

Ran into same today, was going to do a PR with something a bit more complicated, but your fix seems adequate as I can't really imagine any instance in which you'd actually need to read that status if you're on OSX anyway. Thanks for posting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants