\fBovs\-vswitchd\fR process. The currently supported commands are
described below. The command descriptions assume an understanding of
how to configure Open vSwitch.
+.SS "GENERAL COMMANDS"
+.IP "\fBexit\fR"
+Causes \fBovs\-vswitchd\fR to gracefully terminate.
.SS "BRIDGE COMMANDS"
These commands manage bridges.
.IP "\fBfdb/show\fR \fIbridge\fR"
#include "vlog.h"
#define THIS_MODULE VLM_vswitchd
+static unixctl_cb_func ovs_vswitchd_exit;
+
static const char *parse_options(int argc, char *argv[]);
static void usage(void) NO_RETURN;
struct ovsdb_idl *idl;
const char *remote;
bool need_reconfigure;
- bool inited;
+ bool inited, exiting;
unsigned int idl_seqno;
int retval;
if (retval) {
exit(EXIT_FAILURE);
}
+ unixctl_command_register("exit", ovs_vswitchd_exit, &exiting);
daemonize_complete();
need_reconfigure = false;
inited = false;
- for (;;) {
+ exiting = false;
+ while (!exiting) {
if (signal_poll(sighup)) {
vlog_reopen_log_file();
}
leak_checker_usage();
exit(EXIT_SUCCESS);
}
+
+static void
+ovs_vswitchd_exit(struct unixctl_conn *conn, const char *args OVS_UNUSED,
+ void *exiting_)
+{
+ bool *exiting = exiting_;
+ *exiting = true;
+ unixctl_command_reply(conn, 200, NULL);
+}