module OodSupport::Process

A helper module that describes the current running process

Public Class Methods

group() click to toggle source

Primary group of current process @return [Group] group of process

# File lib/ood_support/process.rb, line 12
def self.group
  Group.new ::Process.gid
end
groups() click to toggle source

List of groups current process is in @return [Array<Group>] list of groups for process

# File lib/ood_support/process.rb, line 18
def self.groups
  ::Process.groups.map {|g| Group.new g}
end
groups_changed?() click to toggle source

Whether user's groups changed since running process @return [Boolean] whether groups changed

# File lib/ood_support/process.rb, line 24
def self.groups_changed?
  groups.sort != user.groups.sort
end
user() click to toggle source

Owner of current process @return [User] owner of process

# File lib/ood_support/process.rb, line 6
def self.user
  User.new ::Process.uid
end