mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
Kernel+LibC: Implement fcntl(2) advisory locks
Advisory locks don't actually prevent other processes from writing to the file, but they do prevent other processes looking to acquire and advisory lock on the file. This implementation currently only adds non-blocking locks, which are all I need for now.
This commit is contained in:
parent
fbc56461da
commit
3fa2816642
Notes:
sideshowbarker
2024-07-18 08:41:07 +09:00
Author: https://github.com/petelliott
Commit: 3fa2816642
Pull-request: https://github.com/SerenityOS/serenity/pull/8878
Reviewed-by: https://github.com/alimpfard ✅
8 changed files with 186 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/File.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -53,5 +54,4 @@ void File::detach(FileDescription&)
|
|||
{
|
||||
m_attach_count--;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue