-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsh.h
31 lines (26 loc) · 814 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
#include "get_path.h"
#define PROMPTMAX 32
#define MAXARGS 10
struct pathelement *user_list;
typedef struct ThreadNode{
pthread_t id;
char* fileDesc;
struct ThreadNode * next;
} ThreadNode;
ThreadNode *mailList;
int noclobber;
int sh( int argc, char **argv, char **envp);
void freeList(struct pathelement* head);
void *watchuserThreadFun(void *vargp);
void *watchmailThreadFun(void *vargp);
void execute_command(int pipe_info, char **args, int argsct, struct pathelement *pathlist, char **environ);
char *which(char *command, struct pathelement *pathlist);
char *where(char *command, struct pathelement *pathlist);
void list ( char *dir );
int cd(char *directory);
void pwd();
void pid();
void mykill(int pid, int signal);
void prompt(char *prefix);
void printenv(char **env, char *var);
void watchuser();