feat: implemented pipes and redirects + background operator

This commit is contained in:
2024-03-16 23:07:19 +01:00
parent 6b9bedac3c
commit 7e6c1147db
10 changed files with 246 additions and 74 deletions

3
cmd.h
View File

@@ -29,6 +29,8 @@ typedef struct CommandList {
typedef struct Chain {
CommandList commands;
bool runInBackground;
char *in;
char *out;
} Chain;
@@ -36,6 +38,7 @@ void freeCommand(Command cmd);
void freeChain(Chain chain);
Command buildCommand(List *lp);
void addRedirect(List *lp, Chain *chain);
Chain buildChain(List *lp);
void executeChain(Chain chain, int* status);