void mgt_child_start(void);
void mgt_child_stop(void);
+void mgt_child_kill(void);
void mgt_sigchld(int, short, void *);
typedef void mgt_ccb_f(unsigned, const char *, void *);
/*--------------------------------------------------------------------*/
+void
+mgt_child_kill(void)
+{
+
+ desired = H_STOP;
+ kill(child_pid, 9);
+}
+
+/*--------------------------------------------------------------------*/
+
void
mgt_sigchld(int a, short b, void *c)
{
/*--------------------------------------------------------------------*/
+static void
+m_cli_func_exit(struct cli *cli, char **av, void *priv)
+{
+
+ mgt_child_kill();
+ exit (0);
+}
+
+/*--------------------------------------------------------------------*/
+
static void
m_cli_func_verbose(struct cli *cli, char **av, void *priv)
{
{ CLI_ZERO },
{ CLI_HELP, cli_func_help, cli_proto },
{ CLI_VERBOSE, m_cli_func_verbose, NULL },
- { CLI_EXIT },
+ { CLI_EXIT, m_cli_func_exit, NULL},
{ CLI_QUIT },
{ CLI_BYE },
{ NULL }