-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.h
More file actions
25 lines (21 loc) · 697 Bytes
/
commands.h
File metadata and controls
25 lines (21 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef NYUSH_COMMANDS_H
#define NYUSH_COMMANDS_H
#define MAX_ARGC 1024
struct Cmd {
char *cmd;
char *argv[MAX_ARGC];
int argc;
};
int blankCommand();
int cdCommand(char *path);
int exitCommand(char *cmd);
int fgCommand(int jobIndex);
int jobsCommand();
void runCmdRecursive(struct Cmd *cmds, int currentIndex, int size, int myStdIn, int lastStdOut);
int runCmd(char *programPath, char *args[], int newStdin, int newStdout, const char *fullCmd);
int cmdWithRedirectAndTerminate(const char *cmd);
int cmdWithTerminateAndRedirect(const char *cmd);
int cmdWithTerminate(const char *cmd);
int cmdWithRecursive(const char *cmd);
int cmdWithRedirectAndRecursive(const char *cmd);
#endif