summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2020-01-20 15:15:24 +0300
committerAndreas Kling <kling@serenityos.org>2020-01-20 13:26:06 +0100
commit9bc6157998dc56cb397a352f64ba2270066f986e (patch)
tree31e264a1e5add34b81c2d39b0f23cd52c482d6fc /Kernel
parentb25210ee1b04bf3a317cbca7e8ba7acaaf8ad54a (diff)
downloadserenity-9bc6157998dc56cb397a352f64ba2270066f986e.zip
Kernel: Return new fd from sys$fcntl(F_DUPFD)
This fixes GNU Bash getting confused after performing a redirection.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index e60b719727..11a6c9845b 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -1741,7 +1741,7 @@ int Process::sys$fcntl(int fd, int cmd, u32 arg)
if (new_fd < 0)
return new_fd;
m_fds[new_fd].set(*description);
- break;
+ return new_fd;
}
case F_GETFD:
return m_fds[fd].flags;