1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

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
parent d2bdbc3e77
commit 639c1a1737
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);