Shell: Build as part of Lagom as well

Bringing the Serenity Shell to your very own host system :^)
This commit is contained in:
AnotherTest 2020-06-25 17:15:23 +04:30 committed by Andreas Kling
commit 639c1a1737
Notes: sideshowbarker 2024-07-19 05:08:57 +09:00
5 changed files with 45 additions and 8 deletions

View file

@ -423,7 +423,11 @@ RefPtr<Job> Shell::run_command(AST::Command& command)
return nullptr;
pid_t child = fork();
if (!child) {
if (child < 0) {
perror("fork");
return nullptr;
}
if (child == 0) {
setpgid(0, 0);
tcsetpgrp(0, getpid());
tcsetattr(0, TCSANOW, &default_termios);