Skip to content

pgrep: add runstates TraceStopped, Dead, and Idle#341

Merged
Krysztal112233 merged 1 commit intouutils:mainfrom
cakebaker:pgrep_add_missing_process_states
Mar 6, 2025
Merged

pgrep: add runstates TraceStopped, Dead, and Idle#341
Krysztal112233 merged 1 commit intouutils:mainfrom
cakebaker:pgrep_add_missing_process_states

Conversation

@cakebaker
Copy link
Copy Markdown
Contributor

While reviewing #332 I noticed that our pgrep sometimes showed less PIDs than the original pgrep. The reason is we don't recognize some states like I as a valid state.

This PR adds the missing states t (trace stopped), X (dead), and I (idle) based on information in https://www.man7.org/linux/man-pages//man5/proc_pid_stat.5.html. I omitted the states only available with old kernel versions.

@cakebaker cakebaker force-pushed the pgrep_add_missing_process_states branch from d0098eb to 16e31d6 Compare March 1, 2025 15:04
@Krysztal112233 Krysztal112233 merged commit 7067bdd into uutils:main Mar 6, 2025
14 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (8b64351) to head (16e31d6).
Report is 7 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #341   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cakebaker cakebaker deleted the pgrep_add_missing_process_states branch March 6, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants