From 675f82a6b97b88322e542681618ec78a6666f376 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 27 Aug 2017 16:41:58 +0200 Subject: [PATCH] run_getty2(): Minor fixes only, whitespace + cautionary _exit() Signed-off-by: Joachim Nilsson --- src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exec.c b/src/exec.c index a0b7ca24..ec3b51c2 100644 --- a/src/exec.c +++ b/src/exec.c @@ -285,12 +285,12 @@ pid_t run_getty2(char *tty, char *cmd, char *args[], int console) (void)write(STDERR_FILENO, msg, sizeof(msg)); while (read(STDIN_FILENO, &c, 1) == 1 && c != '\n') - continue; + continue; if (fexist(SYNC_STOPPED)) continue; - execv(cmd, args); + _exit(execv(cmd, args)); } close(fd);