eac112e919
The previous pipe2 implementation used redox_rt::sys::open() which goes through the FILETABLE's insert_upper mechanism. This can collide with the untracked namespace fd (ns_fd) stored in DYNAMIC_PROC_INFO, causing the kernel to overwrite the namespace fd entry with a pipe scheme root entry. Subsequent open() calls then resolve to the wrong scheme, and kdup fails with EBADF because it receives a write-end (odd) ID instead of a read-end (even) ID. Fix: bypass the open() function entirely and use raw syscall::openat + syscall::dup, then register both fds with register_external_fd so the FILETABLE tracks them correctly.