Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin
- require 'sys/proctable'
- rescue LoadError
- Chef::Log.warn("Missing gem 'sys-proctable'")
- end
- module Rackspace
- module Proc
- def getProcPid(name)
- Sys::ProcTable.ps{ |p|
- if /#{name}/ =~ p.cmdline
- return p.pid
- end
- }
- end
- end
- end
Add Comment
Please, Sign In to add comment