-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.h
55 lines (46 loc) · 1.1 KB
/
header.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef headers
#define headers
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
void prompt();
void input();
void tokenize(char *args);
void parse(char** tokens,char *temp);
void piping(char **tokens);
void execute(char **tokens, int cno, int noOfCommands);
void cd(char** tokens);
void pwd();
void echo(char** tokens);
void syscommandsfg(char **tokens, int cno, int noOfCommands);
void syscommandsbg(char **tokens);
void pinfo(char **tokens);
void listjobs();
void sendsig(char** tokens);
void movetofg(char **tokens);
void killallbg();
void signalHandler(int signo, siginfo_t *info, void *ptr);
void ctrlC(int);
void ctrlZ(int);
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_MAGENTA "\x1b[35m"
#define ANSI_COLOR_RESET "\x1b[0m"
char** arr;
char* home;
typedef struct
{
pid_t pid;
char pname[100];
}bgprocs;
bgprocs joblist[1000];
pid_t shellpid;
#endif