mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
Kernel: Expose blocking and cloexec fd flags in ProcFS
This commit is contained in:
parent
eb18825fce
commit
9a41dda029
3 changed files with 14 additions and 0 deletions
|
@ -917,6 +917,15 @@ const FileDescription* Process::file_description(int fd) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
int Process::fd_flags(int fd) const
|
||||
{
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
if (fd < m_fds.size())
|
||||
return m_fds[fd].flags;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t Process::sys$get_dir_entries(int fd, void* buffer, ssize_t size)
|
||||
{
|
||||
if (size < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue