mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
SystemServer: Create /tmp/semaphore on startup
This directory will store all LibPthread named semaphores
This commit is contained in:
parent
35789f56a5
commit
23f3857cdd
1 changed files with 10 additions and 0 deletions
|
@ -465,6 +465,15 @@ static ErrorOr<void> create_tmp_coredump_directory()
|
|||
return {};
|
||||
}
|
||||
|
||||
static ErrorOr<void> create_tmp_semaphore_directory()
|
||||
{
|
||||
dbgln("Creating /tmp/semaphore directory");
|
||||
auto old_umask = umask(0);
|
||||
TRY(Core::System::mkdir("/tmp/semaphore"sv, 0777));
|
||||
umask(old_umask);
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
bool user = false;
|
||||
|
@ -481,6 +490,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
if (!user) {
|
||||
TRY(create_tmp_coredump_directory());
|
||||
TRY(create_tmp_semaphore_directory());
|
||||
TRY(determine_system_mode());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue