1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 16:52:07 +00:00

Kernel: Handle OOM from DoubleBuffer creation in FIFO creation

This commit is contained in:
Brian Gianforcaro 2021-08-01 02:30:52 -07:00 committed by Andreas Kling
parent 15cd5d324c
commit 8d3b819daf
4 changed files with 25 additions and 16 deletions

View file

@ -20,7 +20,9 @@ KResultOr<FlatPtr> Process::sys$pipe(int pipefd[2], int flags)
return EINVAL;
u32 fd_flags = (flags & O_CLOEXEC) ? FD_CLOEXEC : 0;
auto fifo = FIFO::create(uid());
auto fifo = FIFO::try_create(uid());
if (!fifo)
return ENOMEM;
auto open_reader_result = fifo->open_direction(FIFO::Direction::Reader);
if (open_reader_result.is_error())