From 0ad994ee2b0b70de3b3bbd0cc779d97acc106862 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Ganne?= Date: Thu, 10 Apr 2025 16:19:25 +0200 Subject: [PATCH] vlib: fix restart cli command MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: I961a261a647863936021e4b29d406971fd76c0af Signed-off-by: Benoît Ganne --- src/vlib/cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vlib/cli.c b/src/vlib/cli.c index 4198b4b0976..d6a96293869 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -1239,7 +1239,8 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input, } /* Exec ourself */ - execve (vgm->name, (char **) vgm->argv, environ); + if (execve ((void *) vgm->argv[0], (char **) vgm->argv, environ)) + return clib_error_return_unix (0, "execve failed"); return 0; } -- 2.16.6