mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00: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 {};
|
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)
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
bool user = false;
|
bool user = false;
|
||||||
|
@ -481,6 +490,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
TRY(create_tmp_coredump_directory());
|
TRY(create_tmp_coredump_directory());
|
||||||
|
TRY(create_tmp_semaphore_directory());
|
||||||
TRY(determine_system_mode());
|
TRY(determine_system_mode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue