forked from jaredglaser/myshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsh.h
33 lines (30 loc) · 993 Bytes
/
sh.h
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
26
27
28
29
30
31
32
33
#include "get_path.h"
typedef struct node
{
pthread_t thread;
char *data;
struct node *next;
}node;
node *head; //global head of LL, probably not the best place for it.
node *headu; //for the watchuser
int pid;
int sh( int argc, char **argv, char **envp);
void *which(char *command, struct pathelement *pathlist);
char* whichRet(char *command, struct pathelement *pathlist);
char *where(char *command, struct pathelement *pathlist);
void printWorkingDir();
void list ( char **args );
void printenv(char **envp, char **args,int forcePrintAll);
void setEnviornment(char **envp, char**args, struct pathelement *pathlist);
void changeDir(char **args);
void nullify(char **args);
void printPid();
void promptCmd(char **args, char* prompt);
void killProc(char **args);
void watchmailthread(char **args);
void watchmail(char **args);
void addnode(pthread_t thread, char *data);
void watchuser(char **args);
void watchuserthread(char **args);
#define PROMPTMAX 32
#define MAXARGS 10