aboutsummaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
authorPaul Eastham <eastham@google.com>2010-12-04 17:29:31 -0800
committerPaul Eastham <eastham@google.com>2010-12-04 17:39:26 -0800
commit50b3afd9f39619f69dc6f4efc29be88933eb3614 (patch)
tree3b60bfb8f1850877c918b41adaa095652de3dcd9 /init/init.c
parent7e06476f6daf75946d93972e4187f2d600b51fac (diff)
downloadsystem_core-50b3afd9f39619f69dc6f4efc29be88933eb3614.tar.gz
system_core-50b3afd9f39619f69dc6f4efc29be88933eb3614.tar.bz2
system_core-50b3afd9f39619f69dc6f4efc29be88933eb3614.zip
Add "slow_start" keyword to init
This keyword will cause init to wait a few seconds before exec'ing the target binary. Maybe only useful for hacks and debugging. Change-Id: I85caa0bcbc0be7e48bd21eb9e31e039c0740c8d5
Diffstat (limited to 'init/init.c')
-rwxr-xr-xinit/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 7aef3872..ea7687d3 100755
--- a/init/init.c
+++ b/init/init.c
@@ -196,6 +196,10 @@ void service_start(struct service *svc, const char *dynamic_args)
char tmp[32];
int fd, sz;
+ if (svc->flags & SVC_SLOW_START) {
+ sleep(5);
+ }
+
if (properties_inited()) {
get_property_workspace(&fd, &sz);
sprintf(tmp, "%d,%d", dup(fd), sz);