1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Kernel: Turn Process::FileDescriptionAndFlags into a proper class

This commit is contained in:
Andreas Kling 2020-07-30 23:50:31 +02:00
parent f2a152e930
commit 2e2de125e5
8 changed files with 34 additions and 24 deletions

View file

@ -46,12 +46,12 @@ int Process::sys$pipe(int pipefd[2], int flags)
int reader_fd = alloc_fd();
m_fds[reader_fd].set(fifo->open_direction(FIFO::Direction::Reader), fd_flags);
m_fds[reader_fd].description->set_readable(true);
m_fds[reader_fd].description()->set_readable(true);
copy_to_user(&pipefd[0], &reader_fd);
int writer_fd = alloc_fd();
m_fds[writer_fd].set(fifo->open_direction(FIFO::Direction::Writer), fd_flags);
m_fds[writer_fd].description->set_writable(true);
m_fds[writer_fd].description()->set_writable(true);
copy_to_user(&pipefd[1], &writer_fd);
return 0;