BUG/MINOR: debug: do not emit empty lines in thread dumps
authorWilly Tarreau <w@1wt.eu>
Thu, 4 May 2023 14:28:30 +0000 (16:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 May 2023 14:51:50 +0000 (16:51 +0200)
commitcb01f5daa72eec595407a85959d301960d472c93
treee520695e0ed5e9ea4f076d81ab4c28e184936737
parentd4af04198bad49866442b7d21842030f38d14152
BUG/MINOR: debug: do not emit empty lines in thread dumps

In 2.3, commit 471425f51 ("BUG/MINOR: debug: Don't dump the lua stack
if it is not initialized") introduced the possibility to emit an empty
line when there's no Lua info to dump. The problem is that doing this
on the CLI in "show threads" marks the end of the output, and it may
affect some external tools. We need to make sure that LFs are only
emitted if there's something on the line and that all lines properly
start with the prefix.

This may be backported as far as 2.0 since the commit above was
backported there.
src/debug.c