diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-10-22 11:45:20 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-10-22 11:45:20 +0000 |
commit | 6644e1e679dd95ab70637f7330a91dbcafaca49c (patch) | |
tree | cad76e1bf276bc3655d91401f8eaa9e629311294 /init/init.c | |
parent | 035bc4f6c4bbf14af58bb4d93411507554d7ab6b (diff) | |
download | busybox-w32-6644e1e679dd95ab70637f7330a91dbcafaca49c.tar.gz busybox-w32-6644e1e679dd95ab70637f7330a91dbcafaca49c.tar.bz2 busybox-w32-6644e1e679dd95ab70637f7330a91dbcafaca49c.zip |
Be absurdly careful about flushing stdout.
git-svn-id: svn://busybox.net/trunk/busybox@5683 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-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) { |