Make ^C kill shm event loops
This is done unconditinally. There are very few times when we don't
want ^C to kill the loop nicely, so just do it until someone complains.
Also, graceful exit is much better than getting terminated and
potentially core dumping.
Change-Id: Ib156ca779c1c5a8d1597c1531a4b12ec14ae0314
diff --git a/aos/events/ping.cc b/aos/events/ping.cc
index 66c8f12..5a79635 100644
--- a/aos/events/ping.cc
+++ b/aos/events/ping.cc
@@ -7,19 +7,17 @@
#include "glog/logging.h"
int main(int argc, char **argv) {
- FLAGS_logtostderr = true;
- google::InitGoogleLogging(argv[0]);
- ::gflags::ParseCommandLineFlags(&argc, &argv, true);
+ aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("aos/events/pingpong_config.json");
- ::aos::ShmEventLoop event_loop(&config.message());
+ aos::ShmEventLoop event_loop(&config.message());
aos::Ping ping(&event_loop);
event_loop.Run();
- ::aos::Cleanup();
+ aos::Cleanup();
return 0;
}