aos: Optionally give subprocesses more than 1 second to quit
Right now our application manager is hard-coded to send SIGKILL to its
child if it hasn't shut down within 1 second. This is suboptimal
because some applications simply take longer than 1 second to shut
down.
The goal here is to eventually add a "stop duration" field in the AOS
config.
Change-Id: I885f39d4503519bb75598a1b7e595b56e3f21348
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/configuration.fbs b/aos/configuration.fbs
index 0b42f5b..b2b34c1 100644
--- a/aos/configuration.fbs
+++ b/aos/configuration.fbs
@@ -169,6 +169,10 @@
// If set, this is the memory limit to enforce in bytes for the application
// (and it's children)
memory_limit:uint64 = 0 (id: 8);
+
+ // If set, this is the number of nanoseconds the application has to stop. If the application
+ // doesn't stop within the specified time, then it is killed.
+ stop_time:int64 = 1000000000 (id: 9);
}
// Per node data and connection information.