v.21.12Improvements

Fix Editor Waiting Issue During Interactive Query Edition

Fix waiting of the editor during interactive query edition (waitpid() returns -1 on SIGWINCH and EDITOR and clickhouse-local/clickhouse-client works concurrently). #31456 (Azat Khuzhin).
Fixed the issue where the interactive query editor in clickhouse-client and clickhouse-local would hang due to incorrect handling of waitpid() returning -1 on SIGWINCH signals.

Why it matters

This fix addresses the problem where the terminal window resize signal (SIGWINCH) caused waitpid() to return -1, which in turn made the EDITOR command invoked by the clients wait indefinitely. This improves the reliability and user experience when editing queries interactively in ClickHouse clients.

How to use it

Users benefit from this fix automatically after upgrading to the ClickHouse version including this patch. No additional configuration is needed to enable the improved editor behavior during interactive query editing.