diff --git a/apps/login.cpp b/apps/login.cpp index e5d80eb4..8c6b3d61 100644 --- a/apps/login.cpp +++ b/apps/login.cpp @@ -26,11 +26,12 @@ Result luna_main(int argc, char** argv) String name; + setpgid(0, 0); + signal(SIGTTOU, SIG_IGN); + if (isatty(STDIN_FILENO)) tcsetpgrp(STDIN_FILENO, getpgid(0)); + if (username.is_empty()) { - signal(SIGTTOU, SIG_IGN); - - if (isatty(STDIN_FILENO)) tcsetpgrp(STDIN_FILENO, getpgid(0)); auto input = os::File::standard_input();