summaryrefslogtreecommitdiff
path: root/Shell/Builtin.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-10-27 21:38:37 +0330
committerAndreas Kling <kling@serenityos.org>2020-10-29 11:53:01 +0100
commitf4b7a688b1cda6d279936a2592149b612b8d8ca9 (patch)
tree1198c91ce50c7b55d5a08a58e2d8dc253d3dbebf /Shell/Builtin.cpp
parent0bc758d34a4940796c7f6a2c49e592ff3ef93a6b (diff)
downloadserenity-f4b7a688b1cda6d279936a2592149b612b8d8ca9.zip
Shell: Rename {source,dest}_fd to {old,new}_fd
This makes `Rewiring' much more understandable, and un-confuses the uses of `dup2()'. Also fixes `dup2()' bugs.
Diffstat (limited to 'Shell/Builtin.cpp')
-rw-r--r--Shell/Builtin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Shell/Builtin.cpp b/Shell/Builtin.cpp
index f9994965c6..895c4a3b9c 100644
--- a/Shell/Builtin.cpp
+++ b/Shell/Builtin.cpp
@@ -823,7 +823,7 @@ bool Shell::run_builtin(const AST::Command& command, const NonnullRefPtrVector<A
SavedFileDescriptors fds { rewirings };
for (auto& rewiring : rewirings) {
- int rc = dup2(rewiring.dest_fd, rewiring.source_fd);
+ int rc = dup2(rewiring.old_fd, rewiring.new_fd);
if (rc < 0) {
perror("dup2(run)");
return false;