-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.h
52 lines (45 loc) · 912 Bytes
/
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
#ifndef HEADER_H
#define HEADER_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <libgen.h>
#include <dirent.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/resource.h>
#include <sys/select.h>
char USER[1024], HOST[1024], CWD[2048], HOME[2048];
int positions, job_count;
long long int bg_count;
pid_t SHELL_ID, CHILD_PID[1024];
char temp[100][1024];
char hist[20][1000];
int hist_i;
struct job
{
char job_name[500];
pid_t PID;
};
typedef struct job job;
job jobarray[100];
job current_fg;
// main.c
void shell();
void prompt();
char *input();
void done();
void ctrl_c (int signum);
void ctrl_z (int signum);
char * find_line(char *filename, int n);
void del_process(int id);
// execute.c
void execute (char *line);
#endif