Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 18, 2016 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7aa3add3e6434d072fa31615106e3633 to your computer and use it in GitHub Desktop.
Save anonymous/7aa3add3e6434d072fa31615106e3633 to your computer and use it in GitHub Desktop.
Process.kill(0, PID)
. . .
rescue Errno::ESERCH
#continue with the code
rescue Errno::EPERM
puts "Process(#{PID}) already running but it is owned by " USERID and GROUPID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment