getpriority(2)/setpriority(2) for mruby, it like renice(1)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.travis.yml
.travis_build_config.rb
LICENSE
README.md
Rakefile
mrbgem.rake
mruby-renice.gem

README.md

mruby-renice Build Status

getpriority(2)/setpriority(2) for mruby, it like renice(1)

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'takumakume/mruby-renice'
end

usage

  • for process

    Renice::Process.get(pid)
    #=> 0
    
    Renice::Process.set(pid, prio)
    #=> true or raise
  • for process group

    Renice::ProcessGroup.get(pgid)
    Renice::ProcessGroup.set(pgid, prio)
  • for process group

    Renice::User.get(uid)
    Renice::User.set(uid, prio)

License

under the MIT License:

  • see LICENSE file