Module: Puppet::Util::Limits

Included in:
CommandLine
Defined in:
lib/puppet/util/limits.rb

Instance Method Summary collapse

Instance Method Details

#setpriority(priority) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
11
12
13
# File 'lib/puppet/util/limits.rb', line 7

def setpriority(priority)
  return unless priority

  Process.setpriority(0, Process.pid, priority)
rescue Errno::EACCES, NotImplementedError
  Puppet.warning(_("Failed to set process priority to '%{priority}'") % { priority: priority })
end