Kernel: Return new fd from sys$fcntl(F_DUPFD)

This fixes GNU Bash getting confused after performing a redirection.
This commit is contained in:
Sergey Bugaev 2020-01-20 15:15:24 +03:00 committed by Andreas Kling
commit 9bc6157998
Notes: sideshowbarker 2024-07-19 09:56:29 +09:00

View file

@ -1741,7 +1741,7 @@ int Process::sys$fcntl(int fd, int cmd, u32 arg)
if (new_fd < 0) if (new_fd < 0)
return new_fd; return new_fd;
m_fds[new_fd].set(*description); m_fds[new_fd].set(*description);
break; return new_fd;
} }
case F_GETFD: case F_GETFD:
return m_fds[fd].flags; return m_fds[fd].flags;