summaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-04-19 17:11:33 -0700
committerColin Cross <ccross@android.com>2010-04-21 19:43:35 -0700
commit3294bbbad9494eb4ca534624b96e39f8ed15aaf2 (patch)
tree8bcb7baa0caf6830af09c401a835dc9171abe13e /init/init.c
parentcd0f173e2790ee068fd2a20bcfc6c20468e97e51 (diff)
downloadcore-3294bbbad9494eb4ca534624b96e39f8ed15aaf2.tar.gz
core-3294bbbad9494eb4ca534624b96e39f8ed15aaf2.tar.bz2
core-3294bbbad9494eb4ca534624b96e39f8ed15aaf2.zip
init: Allow services to start before property triggers are up
Change-Id: I4f87657123bea88b7b5c537781868908d8d66b01
Diffstat (limited to 'init/init.c')
-rwxr-xr-xinit/init.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c
index e2889b6bf..3471cf865 100755
--- a/init/init.c
+++ b/init/init.c
@@ -193,9 +193,11 @@ void service_start(struct service *svc, const char *dynamic_args)
char tmp[32];
int fd, sz;
- get_property_workspace(&fd, &sz);
- sprintf(tmp, "%d,%d", dup(fd), sz);
- add_environment("ANDROID_PROPERTY_WORKSPACE", tmp);
+ if (properties_inited()) {
+ get_property_workspace(&fd, &sz);
+ sprintf(tmp, "%d,%d", dup(fd), sz);
+ add_environment("ANDROID_PROPERTY_WORKSPACE", tmp);
+ }
for (ei = svc->envvars; ei; ei = ei->next)
add_environment(ei->name, ei->value);
@@ -281,7 +283,8 @@ void service_start(struct service *svc, const char *dynamic_args)
svc->pid = pid;
svc->flags |= SVC_RUNNING;
- notify_service_state(svc->name, "running");
+ if (properties_inited())
+ notify_service_state(svc->name, "running");
}
void service_stop(struct service *svc)