Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Process.getpriority

(::Integer kind, ::Integer arg0) -> ::Integer
Process.getpriority(kind, id) → integer

Returns the scheduling priority for specified process, process group, or user.

Argument kind is one of:

Argument id is the ID for the process, process group, or user; zero specified the current ID for kind.

Examples:

Example
Process.getpriority(Process::PRIO_USER, 0)    # => 19
Process.getpriority(Process::PRIO_PROCESS, 0) # => 19

Not available on all platforms.

See also .getpgrp .getrlimit .getpgid .getsid also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0