diff --git a/include/task.hpp b/include/task.hpp index 29e648f..470cfe8 100644 --- a/include/task.hpp +++ b/include/task.hpp @@ -465,6 +465,8 @@ namespace Tasking /* Other */ Signal Signals; + mode_t FileCreationMask = S_IRUSR | S_IWUSR | S_IRGRP | + S_IWGRP | S_IROTH | S_IWOTH; /* Threads & Children */ std::list Threads; diff --git a/syscalls/linux.cpp b/syscalls/linux.cpp index ff7688d..f42d485 100644 --- a/syscalls/linux.cpp +++ b/syscalls/linux.cpp @@ -1158,6 +1158,7 @@ static pid_t linux_fork(SysFrm *sf) NewProcess->FileDescriptors->Fork(Parent->FileDescriptors); NewProcess->Executable = Parent->Executable; NewProcess->CurrentWorkingDirectory = Parent->CurrentWorkingDirectory; + NewProcess->FileCreationMask = Parent->FileCreationMask; TCB *NewThread = TaskManager->CreateThread(NewProcess,