fix(px4_daemon): annotate intentional empty catch in client cleanup

bugprone-empty-catch flagged the std::system_error swallow around the
detached stdin-relay thread. Spell out why the catch body is empty and
add an explicit (void)0 statement so the intent is visible to both the
linter and future readers: stdin forwarding is best-effort, and a
failed thread spawn must not abort the client.

Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
This commit is contained in:
Nuno Marques
2026-05-07 16:37:54 -07:00
parent cd17d1e817
commit 101c84cf59
@@ -225,7 +225,10 @@ Client::process_args(const int argc, const char **argv)
std::thread(stdin_forward_loop, _fd).detach();
} catch (const std::system_error &) {
// Non-fatal: stdin relay was best-effort.
// intentionally swallowed: stdin relay is best-effort. If the OS cannot
// spawn the helper thread, interactive commands lose keystroke
// forwarding but the command itself still runs to completion.
(void)0;
}
return _listen();