aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-22 11:45:20 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-22 11:45:20 +0000
commit5956028f6f438131e8995af029de448a21ea8d8c (patch)
treecad76e1bf276bc3655d91401f8eaa9e629311294 /init
parent9ffd5776eb5b686e7c4b1240c0efe7d5926eb6db (diff)
downloadbusybox-5956028f6f438131e8995af029de448a21ea8d8c.tar.gz
Be absurdly careful about flushing stdout.
Diffstat (limited to 'init')
-rw-r--r--init/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index ec1bacc83..9a4c9669c 100644
--- a/init/init.c
+++ b/init/init.c
@@ -628,6 +628,7 @@ static pid_t run(struct init_action *a)
"Waiting for enter to start '%s' (pid %d, terminal %s)\n",
cmdpath, getpid(), a->terminal);
write(fileno(stdout), press_enter, sizeof(press_enter) - 1);
+ fflush(stdout);
getc(stdin);
}
@@ -682,8 +683,7 @@ static void run_actions(int action)
for (a = init_action_list; a; a = tmp) {
tmp = a->next;
if (a->action == action) {
- if (a->
- action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
+ if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
waitfor(a);
delete_init_action(a);
} else if (a->action & ONCE) {