aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-04-22 11:52:23 -0700
committerColin Cross <ccross@android.com>2010-04-22 11:52:23 -0700
commitebd4613bfc8d926503f7de38240529ce0b1997ee (patch)
tree00348fe1c248104a95ee0c40b8ab285f5555f9cc /init
parentec35336102d2e73167e970e6287c045917d9574b (diff)
downloadsystem_core-ebd4613bfc8d926503f7de38240529ce0b1997ee.tar.gz
system_core-ebd4613bfc8d926503f7de38240529ce0b1997ee.tar.bz2
system_core-ebd4613bfc8d926503f7de38240529ce0b1997ee.zip
init: Fix init spinning once init.rc is complete
When the init process ran out of actions to execute, cur_action was NULL and action_queue_empty() was true, but cur_command was still set. This patch clears cur_command when a new action is retreived, and only depends on cur_action and action_queue_empty() to determine the poll timeout. Change-Id: Iaa95063c8c267a5b1ada9f20363b99c433e61ac4
Diffstat (limited to 'init')
-rwxr-xr-xinit/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c
index 4f4059b8..8f95da78 100755
--- a/init/init.c
+++ b/init/init.c
@@ -492,6 +492,7 @@ void execute_one_command(void)
if (!cur_action || !cur_command || is_last_command(cur_action, cur_command)) {
cur_action = action_remove_queue_head();
+ cur_command = NULL;
if (!cur_action)
return;
INFO("processing action %p (%s)\n", cur_action, cur_action->name);
@@ -762,7 +763,7 @@ int main(int argc, char **argv)
timeout = 0;
}
- if (!action_queue_empty() || cur_command)
+ if (!action_queue_empty() || cur_action)
timeout = 0;
#if BOOTCHART