Skip to content

fix(linkup-cli): fix thread-duplicates on linkup health list of orphans #236

Merged
RayProud merged 3 commits intonextfrom
romanprudnikov/ship-2074-fix-output-of-linkup-health-on-linux
Apr 28, 2025
Merged

fix(linkup-cli): fix thread-duplicates on linkup health list of orphans #236
RayProud merged 3 commits intonextfrom
romanprudnikov/ship-2074-fix-output-of-linkup-health-on-linux

Conversation

@RayProud
Copy link
Contributor

@RayProud RayProud commented Apr 25, 2025

macOS doesn’t expose each thread as a “full” process.
However, Linux does. Which results in lots of thread-duplicates on linkup health on Linux.

From the Apple documentation

Each process (application) in OS X or iOS is made up of one or more threads, each of which represents a single path of execution through the application's code.

Whereas in Linux, a thread is a process on its own.

@RayProud RayProud requested review from augustoccesar and Copilot and removed request for Copilot April 25, 2025 13:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses an issue with duplicate thread entries in the linkup health list by introducing logic to filter out duplicate process commands.

  • Introduces a helper function, is_child_of_current_process, to exclude child processes from orphan checks.
  • Adds a HashSet (seen_commands) to filter out duplicate command strings within the orphan process detection.
Comments suppressed due to low confidence (1)

linkup-cli/src/commands/health.rs:210

  • [nitpick] The term 'thread-duplicates' in the comment is ambiguous since the code filters duplicate process commands. Consider clarifying the comment to accurately reflect whether it refers to duplicate processes or threads.
                // If there are thread-duplicates, ignore them

@RayProud RayProud merged commit d82c517 into next Apr 28, 2025
6 checks passed
@RayProud RayProud deleted the romanprudnikov/ship-2074-fix-output-of-linkup-health-on-linux branch April 28, 2025 08:32
augustoccesar added a commit that referenced this pull request May 5, 2025
This release gets the Linux version closer to the macOS. We are testing it with Ubuntu.

Main changes:
- Ensure that Linkup can bind to 80/443 on Linux
  -  #232 (fixes: 34f5282, 7e8cef5, b6fac77)
- Manage self-signed certificates on Linux
  -  #234 
- Fix `health` command output on Linux
  - #236   

Other changes:
- Fix install script link on docs (8e6009d)
- Use Ruff formatting on install script (e39de86)
- Don't propagate `baggage` header (#237 )

---------

Co-authored-by: Roman Prudnikov <stillerr@yandex.ru>
Co-authored-by: Oliver Stenbom <oliver@stenbom.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants