← Commit list

5956028f6

Eric Andersen
Eric Andersen
2002-10-22
FAILED Duration: 11s

Subject

Be absurdly careful about flushing stdout.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

init/init.c+2 -2
@@ -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) {