kernel/fs: Unset non-blocking on the correct FD.

_kern_fcntl operates on kernel FDs, while here we have user FDs.
Should fix #19195.
This commit is contained in:
Augustin Cavalier 2024-10-20 18:29:09 -04:00
parent e4a557f372
commit ec464820c0

View File

@ -9609,7 +9609,7 @@ _user_create_pipe(int* userFDs)
fds[0] = open_vnode(vnode, O_RDONLY | O_NONBLOCK, false);
fds[1] = open_vnode(vnode, O_WRONLY, false);
// Reset O_NONBLOCK
_kern_fcntl(fds[0], F_SETFL, 0);
common_fcntl(fds[0], F_SETFL, 0, false);
FDCloser closer0(fds[0], false);
FDCloser closer1(fds[1], false);