diff --git a/Kernel/Syscalls/pipe.cpp b/Kernel/Syscalls/pipe.cpp index 50f497555a..10c8c01f84 100644 --- a/Kernel/Syscalls/pipe.cpp +++ b/Kernel/Syscalls/pipe.cpp @@ -13,9 +13,7 @@ ErrorOr Process::sys$pipe(int pipefd[2], int flags) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) TRY(require_promise(Pledge::stdio)); - auto open_count = fds().with_shared([](auto& fds) { return fds.open_count(); }); - if (open_count + 2 > OpenFileDescriptions::max_open()) - return EMFILE; + // Reject flags other than O_CLOEXEC, O_NONBLOCK if ((flags & (O_CLOEXEC | O_NONBLOCK)) != flags) return EINVAL;