diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-22 11:45:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-22 11:45:20 +0000 |
commit | 5956028f6f438131e8995af029de448a21ea8d8c (patch) | |
tree | cad76e1bf276bc3655d91401f8eaa9e629311294 | |
parent | 9ffd5776eb5b686e7c4b1240c0efe7d5926eb6db (diff) | |
download | busybox-w32-5956028f6f438131e8995af029de448a21ea8d8c.tar.gz busybox-w32-5956028f6f438131e8995af029de448a21ea8d8c.tar.bz2 busybox-w32-5956028f6f438131e8995af029de448a21ea8d8c.zip |
Be absurdly careful about flushing stdout.
-rw-r--r-- | init/init.c | 4 |
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) | |||
628 | "Waiting for enter to start '%s' (pid %d, terminal %s)\n", | 628 | "Waiting for enter to start '%s' (pid %d, terminal %s)\n", |
629 | cmdpath, getpid(), a->terminal); | 629 | cmdpath, getpid(), a->terminal); |
630 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); | 630 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); |
631 | fflush(stdout); | ||
631 | getc(stdin); | 632 | getc(stdin); |
632 | } | 633 | } |
633 | 634 | ||
@@ -682,8 +683,7 @@ static void run_actions(int action) | |||
682 | for (a = init_action_list; a; a = tmp) { | 683 | for (a = init_action_list; a; a = tmp) { |
683 | tmp = a->next; | 684 | tmp = a->next; |
684 | if (a->action == action) { | 685 | if (a->action == action) { |
685 | if (a-> | 686 | if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) { |
686 | action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) { | ||
687 | waitfor(a); | 687 | waitfor(a); |
688 | delete_init_action(a); | 688 | delete_init_action(a); |
689 | } else if (a->action & ONCE) { | 689 | } else if (a->action & ONCE) { |