On a Wednesday in 2026, Peter Krempa via Devel wrote:
From: Peter Krempa <pkrempa@redhat.com>
The completer closes stderr to suppress anything poluting the shell when
*polluting
completion would cause any errors.
Since 'virshReconnect' would call 'vshError' on connection failure this causes vshError to be killed by SIGPIPE and not provide any completions if the connection is not possible.
To avoid this add a flag called 'stderr_closed' to vshControl and use it to suppress output in 'vshPrintStderr'. Keep only the log.
Prior to this patch, attempt to run completion on a host with all daemons shut down would result in:
# virsh complete -- "start" "--doma" ; echo $? 141 #
With this patch the completion will still fail but the return code will be 1. Further patch will allow completion.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tools/vsh.c | 5 +++++ tools/vsh.h | 2 ++ 2 files changed, 7 insertions(+)
Jano