Add a /proc/PID/fds text files that lists all the fds open in a process.

This commit is contained in:
Andreas Kling 2018-11-01 14:00:28 +01:00
commit fd03776443
Notes: sideshowbarker 2024-07-19 18:34:52 +09:00
5 changed files with 44 additions and 5 deletions

View file

@ -175,3 +175,15 @@ const TTY* FileHandle::tty() const
return static_cast<const TTY*>(device);
return nullptr;
}
int FileHandle::close()
{
return 0;
}
String FileHandle::absolute_path() const
{
if (isTTY())
return tty()->ttyName();
return VirtualFileSystem::the().absolutePath(m_vnode->inode);
}