mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
Minor cleanup.
This commit is contained in:
1 parent
f96fb855ce
commit
4f2cf52eff
1 file changed
+2
-2
@@ -542,7 +542,7 @@ pid_t run_getty(char *cmd, char *args[], int console)
|
|||||||
DFLSIG(sa, i, 0);
|
DFLSIG(sa, i, 0);
|
||||||
|
|
||||||
while (!fexist(SYNC_SHUTDOWN)) {
|
while (!fexist(SYNC_SHUTDOWN)) {
|
||||||
static const char msg[] = "\nPlease press Enter to activate this console. ";
|
static const char msg[] = "\nPlease press Enter to activate this console.";
|
||||||
|
|
||||||
if (fexist(SYNC_STOPPED)) {
|
if (fexist(SYNC_STOPPED)) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -550,7 +550,7 @@ pid_t run_getty(char *cmd, char *args[], int console)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (console) {
|
if (console) {
|
||||||
i = write(STDERR_FILENO, msg, sizeof(msg) - 1);
|
i = write(STDERR_FILENO, msg, sizeof(msg));
|
||||||
while (read(STDIN_FILENO, &c, 1) == 1 && c != '\n')
|
while (read(STDIN_FILENO, &c, 1) == 1 && c != '\n')
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user