login: Create a new process group to log in
This commit is contained in:
parent
aac8280e8a
commit
b1fb6dee8a
@ -26,11 +26,12 @@ Result<int> 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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user