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:
parent
15cd5d324c
commit
8d3b819daf
4 changed files with 25 additions and 16 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue