Have Application class watch for binary file changes
It would be nice to have a mode for `aos_starter` that lets you readily
restart all changed applications. It's also good to know if the
applications running are the ones on disk. Track whether the file has
changed since we forked the application (as implemented, I have an
"unknown" state for if the file changed while forking--it should be
possible theoretically to detect this, but I don't want to deal with the
complexity, and it seems generally unlikely for the file to have changed
in the short window while it is fork'ing).
Change-Id: I55af6e2b9704fef328d90f42c1273c78c2b8268c
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/aos/starter/starter_test.cc b/aos/starter/starter_test.cc
index cbb83f6..e68cf05 100644
--- a/aos/starter/starter_test.cc
+++ b/aos/starter/starter_test.cc
@@ -349,7 +349,7 @@
// it grabbed the name after the fork() but before the execvp(). To
// protect against that, wait an extra cycle. If things aren't fixed by
// the second cycle, then that is a problem.
- if (pong_running_count < 2) {
+ if (pong_running_count < 3) {
return;
}
ASSERT_TRUE(pong_app_status->has_process_info());