uutils / uutils/coreutils

nice, Windows: support mapping current Priority Class

Open
#14,484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P - Windows U - nice
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

While setting Priority Class is supported and Priority Class is mapped like
https://github.com/uutils/coreutils/blob/2c0e1b981fdce56bb8cc729dffed702ff0410e8e/src/uu/nice/src/nice.rs#L159-L167
. showing (mapping) current Priority Class is not supported:
https://github.com/uutils/coreutils/blob/2c0e1b981fdce56bb8cc729dffed702ff0410e8e/src/uu/nice/src/nice.rs#L109-L110

It would be better to be compatible with Cygwin's nice command.
Also, nice should show raw Priority Class e.g. instead of value if it is not a mapped class.
ref: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setpriorityclass

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/uu/nice/src/nice.rs, especially the current Priority Class display around lines 109-110 and the mapping logic around lines 159-167. Read the referenced Windows SetPriorityClass documentation and compare Cygwin's nice behavior. Done means nice reports the current Windows Priority Class, including the raw value when it has no mapped class.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.