mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
Kernel: Make fcntl(F_SETFL) actually update the append/blocking flags.
This commit is contained in:
parent
7710863e3c
commit
8fe72d7b3c
3 changed files with 11 additions and 6 deletions
|
@ -328,3 +328,10 @@ const Socket* FileDescriptor::socket() const
|
|||
return nullptr;
|
||||
return static_cast<const Socket*>(m_file.ptr());
|
||||
}
|
||||
|
||||
void FileDescriptor::set_file_flags(dword flags)
|
||||
{
|
||||
m_is_blocking = !(flags & O_NONBLOCK);
|
||||
m_should_append = flags & O_APPEND;
|
||||
m_file_flags = flags;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
void set_should_append(bool s) { m_should_append = s; }
|
||||
|
||||
dword file_flags() const { return m_file_flags; }
|
||||
void set_file_flags(dword flags) { m_file_flags = flags; }
|
||||
void set_file_flags(dword);
|
||||
|
||||
bool is_socket() const;
|
||||
Socket* socket();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue