* [PATCH] client: avoid segfault in iwctl quit
@ 2023-05-02 8:48 Ronan Pigott
2023-05-07 23:03 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Ronan Pigott @ 2023-05-02 8:48 UTC (permalink / raw)
To: iwd; +Cc: Ronan Pigott
iwctl quit (running quit non-interactively) isn't a useful command,
but it shouldn't segfault. Let's avoid calling readline functions if
we haven't initialized readline in this run.
---
client/display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/client/display.c b/client/display.c
index 59086642c273..8b06ff58384b 100644
--- a/client/display.c
+++ b/client/display.c
@@ -890,7 +890,8 @@ void display_agent_prompt_release(const char *label)
void display_quit(void)
{
- rl_crlf();
+ if (command_is_interactive_mode())
+ rl_crlf();
}
static void window_change_signal_handler(void *user_data)
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] client: avoid segfault in iwctl quit
2023-05-02 8:48 [PATCH] client: avoid segfault in iwctl quit Ronan Pigott
@ 2023-05-07 23:03 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2023-05-07 23:03 UTC (permalink / raw)
To: Ronan Pigott, iwd
Hi Ronan,
On 5/2/23 03:48, Ronan Pigott wrote:
> iwctl quit (running quit non-interactively) isn't a useful command,
> but it shouldn't segfault. Let's avoid calling readline functions if
> we haven't initialized readline in this run.
> ---
> client/display.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-07 23:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 8:48 [PATCH] client: avoid segfault in iwctl quit Ronan Pigott
2023-05-07 23:03 ` Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).