#include <vlib/vlib.h>
#include <vppinfra/cpu.h>
+#include <unistd.h>
/* Root of all show commands. */
/* *INDENT-OFF* */
};
/* *INDENT-ON* */
+static clib_error_t *
+restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ char *newenviron[] = { NULL };
+
+ execve (vm->name, (char **) vm->argv, newenviron);
+
+ return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (restart_cmd,static) = {
+ .path = "restart",
+ .short_help = "restart process",
+ .function = restart_cmd_fn,
+};
+/* *INDENT-ON* */
+
#ifdef TEST_CODE
/*
* A trivial test harness to verify the per-process output_function