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.


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

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