mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
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.
This commit is contained in:
parent
0bc758d34a
commit
f4b7a688b1
Notes:
sideshowbarker
2024-07-19 01:40:07 +09:00
Author: https://github.com/alimpfard
Commit: f4b7a688b1
Pull-request: https://github.com/SerenityOS/serenity/pull/3858
4 changed files with 74 additions and 54 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue