Skip to content

Conversation

@alexanderstephan
Copy link

No description provided.

@alexanderstephan alexanderstephan force-pushed the fix-show-proc-v2 branch 2 times, most recently from ce870ec to 972d5af Compare December 11, 2025 12:12
Change mworker_env_to_proc_list() to if (child->pid > 0) before
LIST_APPEND, avoiding invalid PIDs (0/-1) in the process list.
This has no functional impact beyond stricter validation and it aligns
with existing kill safeguards.
Drop the second #include <haproxy/list.h> from mworker.c.
No functional change; reduces redundancy and keeps includes tidy.
…roc"

After commit 594408c, related to ticket haproxy#3204, the "show proc" logic has
been fixed to be able to print more than 202 processes. However, this
fix can lead to the omission of entries in case they have the same
timestamp.

To fix this, we now flush the CLI output only when the worker timestamp
changes, batching entries that share the same second. We apply the same
logic to old workers and update ctx->next_uptime at each flush and after
the final group to resume correctly.
… proc"

Introduce cli_append_worker_row() to centralize formatting of a single
worker row. Also, replace duplicated row-printing code in both current
and old workers loops with the helper. Motivation: Reduces LOC and
improves readability by removing duplication.
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