summaryrefslogtreecommitdiff
path: root/src/exec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.h')
-rw-r--r--src/exec.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/exec.h b/src/exec.h
new file mode 100644
index 0000000..9ee8164
--- /dev/null
+++ b/src/exec.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "utils.h"
+#include "preproc.h"
+
+
+typedef struct {
+ int old_fd;
+ int new_fd;
+} FdRedirect;
+
+DECLARE_VEC(FdRedirect, FdRedirectVec)
+
+typedef struct {
+ char** args;
+ FdRedirectVec redirs;
+ int stdin_fd;
+ int stdout_fd;
+ IntVec child_close_fds;
+ IntVec parent_close_fds;
+ Connector term;
+} Command;
+
+DECLARE_VEC(Command, CommandVec)
+
+void process_input_line(char* line, ShellState* shstate);