From: Alan T. DeKok Date: Wed, 31 Dec 2025 17:34:37 +0000 (-0500) Subject: exit the server when the radmin interface hits EOF X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4afde486fc095889313787f6e0a85e9e0f02ca2;p=thirdparty%2Ffreeradius-server.git exit the server when the radmin interface hits EOF --- diff --git a/src/bin/radmin.c b/src/bin/radmin.c index 4c31a9f15e4..74075645a6d 100644 --- a/src/bin/radmin.c +++ b/src/bin/radmin.c @@ -267,8 +267,17 @@ static void *fr_radmin(UNUSED void *input_ctx) line = readline(prompt); if (stop) break; - if (!line) continue; + /* + * NULL means "read hit EOF" + */ + if (!line) { + main_loop_signal_raise(RADIUS_SIGNAL_SELF_EXIT); + break; + } + /* + * non-NULL, but empty line means "no input" + */ if (!*line) { radmin_free(line); continue;