Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darwin: fix process state visualization in DarwinProcessTable #1609

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

aestriplex
Copy link
Contributor

There is a problem with the process state column on macOS. All the processes but htop itself are marked as ProcessState.UNKNOWN ('?'). This behavior was referenced in this old issue: #622.

DarwinProcess_scanThreads contains the code related to the mach subsystem, that retrieves the information thread by thread. For some of them (as process state information) this is not necessary. We have this information right in the kinfo_proc structure, allocated in DarwinProcessTable.c. This allows us to avoid dealing with threads unless strictly necessary, such as in the case of process state information.

We have an analogous issue with the running time, that is not updated during the execution of the program, but I'll open a separated pr for that.

@BenBE BenBE added enhancement Extension or improvement to existing feature MacOS 🍏 MacOS / Darwin related issues labels Feb 19, 2025
Copy link
Member

@BenBE BenBE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor whitespace changes left, apart from that LGTM. Just amend the existing commit to clean up these issues …

@BenBE BenBE added this to the 3.4.0 milestone Feb 19, 2025
@aestriplex aestriplex force-pushed the darwin-process-status branch from d74abc3 to 1eb2aee Compare February 19, 2025 16:03
@fasterit fasterit merged commit e2f6be9 into htop-dev:main Feb 20, 2025
18 checks passed
BenBE pushed a commit that referenced this pull request Feb 21, 2025
Closes #1611

Co-authored-by: aestriplex <[email protected]>
Co-authored-by: Explorer09 <[email protected]>
@aestriplex aestriplex deleted the darwin-process-status branch February 21, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Extension or improvement to existing feature MacOS 🍏 MacOS / Darwin related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants