aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/exec.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-11-16 15:21:55 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-11-16 15:21:55 -0800
commitd1caabb4cd9f283f8e21e742c42e1ceb454133dc (patch)
treea9e9a027e8092757b8e72c4825cbaecff7c40ce4 /src/cmd/rc/exec.c
parente923adef5df8077259ed9973a4bffb0e08999fbe (diff)
Feat: added fd duplications
Diffstat (limited to 'src/cmd/rc/exec.c')
-rw-r--r--src/cmd/rc/exec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cmd/rc/exec.c b/src/cmd/rc/exec.c
index 28941a0..9ebb517 100644
--- a/src/cmd/rc/exec.c
+++ b/src/cmd/rc/exec.c
@@ -689,6 +689,19 @@ Xword(void)
}
void
+Xclose(void)
+{
+ pushredir(Rclose, runner->code.exe[runner->code.i++].i, 0);
+}
+
+void
+Xdup(void)
+{
+ pushredir(Rclose, runner->code.exe[runner->code.i].i, runner->code.exe[runner->code.i+1].i);
+ runner->code.i += 2;
+}
+
+void
Xwrite(void)
{
int fd;