From 6d37aaf186c9f4595258903241f4fa0175ecf6dd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 16 Nov 2010 15:14:58 -0800 Subject: [PATCH] Make the "exit" unixctl command reliable in ovsdb-server, ovs-vswitchd. If "ovs-appctl exit" happens to hit ovsdb-server or ovs-vswitchd at a moment when nothing else is happening to wake the daemon up, it can take a long time for them to exit. This seems to account for occasional "make check" failures on Nicira's internal builds. It probably fixes some Debian automatic build failures as well. --- ovsdb/ovsdb-server.c | 3 +++ vswitchd/ovs-vswitchd.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 872cc9f9..c7a93815 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -149,6 +149,9 @@ main(int argc, char *argv[]) if (run_process) { process_wait(run_process); } + if (exiting) { + poll_immediate_wake(); + } poll_block(); } ovsdb_jsonrpc_server_destroy(jsonrpc); diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index c307c928..0371e571 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -99,6 +99,9 @@ main(int argc, char *argv[]) unixctl_server_wait(unixctl); dp_wait(); netdev_wait(); + if (exiting) { + poll_immediate_wake(); + } poll_block(); } -- 2.30.2