Implement process file mode creation mask

This commit is contained in:
EnderIce2 2024-04-01 00:47:33 +03:00
parent a3b3ab76a7
commit 473821bfa8
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 3 additions and 0 deletions

View File

@ -465,6 +465,8 @@ namespace Tasking
/* Other */ /* Other */
Signal Signals; Signal Signals;
mode_t FileCreationMask = S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH;
/* Threads & Children */ /* Threads & Children */
std::list<TCB *> Threads; std::list<TCB *> Threads;

View File

@ -1158,6 +1158,7 @@ static pid_t linux_fork(SysFrm *sf)
NewProcess->FileDescriptors->Fork(Parent->FileDescriptors); NewProcess->FileDescriptors->Fork(Parent->FileDescriptors);
NewProcess->Executable = Parent->Executable; NewProcess->Executable = Parent->Executable;
NewProcess->CurrentWorkingDirectory = Parent->CurrentWorkingDirectory; NewProcess->CurrentWorkingDirectory = Parent->CurrentWorkingDirectory;
NewProcess->FileCreationMask = Parent->FileCreationMask;
TCB *NewThread = TCB *NewThread =
TaskManager->CreateThread(NewProcess, TaskManager->CreateThread(NewProcess,