diff options
-rw-r--r-- | init.c | 3 | ||||
-rw-r--r-- | init/init.c | 3 |
2 files changed, 2 insertions, 4 deletions
@@ -448,14 +448,13 @@ static pid_t run(char *command, char *terminal, int get_enter) | |||
448 | * be allowed to start a shell or whatever an init script | 448 | * be allowed to start a shell or whatever an init script |
449 | * specifies. | 449 | * specifies. |
450 | */ | 450 | */ |
451 | char c; | ||
452 | #ifdef DEBUG_INIT | 451 | #ifdef DEBUG_INIT |
453 | pid_t shell_pgid = getpid(); | 452 | pid_t shell_pgid = getpid(); |
454 | message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\r\n", | 453 | message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\r\n", |
455 | command, shell_pgid, terminal); | 454 | command, shell_pgid, terminal); |
456 | #endif | 455 | #endif |
457 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); | 456 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); |
458 | read(fileno(stdin), &c, 1); | 457 | getc(stdin); |
459 | } | 458 | } |
460 | 459 | ||
461 | #ifdef DEBUG_INIT | 460 | #ifdef DEBUG_INIT |
diff --git a/init/init.c b/init/init.c index 7af8c4a95..7e821f110 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -448,14 +448,13 @@ static pid_t run(char *command, char *terminal, int get_enter) | |||
448 | * be allowed to start a shell or whatever an init script | 448 | * be allowed to start a shell or whatever an init script |
449 | * specifies. | 449 | * specifies. |
450 | */ | 450 | */ |
451 | char c; | ||
452 | #ifdef DEBUG_INIT | 451 | #ifdef DEBUG_INIT |
453 | pid_t shell_pgid = getpid(); | 452 | pid_t shell_pgid = getpid(); |
454 | message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\r\n", | 453 | message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\r\n", |
455 | command, shell_pgid, terminal); | 454 | command, shell_pgid, terminal); |
456 | #endif | 455 | #endif |
457 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); | 456 | write(fileno(stdout), press_enter, sizeof(press_enter) - 1); |
458 | read(fileno(stdin), &c, 1); | 457 | getc(stdin); |
459 | } | 458 | } |
460 | 459 | ||
461 | #ifdef DEBUG_INIT | 460 | #ifdef DEBUG_INIT |