-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
51 lines (49 loc) · 1.44 KB
/
Copy pathshell.h
File metadata and controls
51 lines (49 loc) · 1.44 KB
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
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <limits.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <syscall.h>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
#include <ncurses.h>
typedef struct {
int id;
int crtime;
char name[256];
int status;
} pid_det;
int proc_comp(const void *a, const void *b);
void backproc();
void exec(char* parts[], int index, int bg, char* home);
void bg(int count, char* parts[]);
void fg(int count, char* parts[]);
void unsetenvv(char **parts,int count);
void setenvv(char **parts, int count);
void kjob(int count, char* parts[]);
void jobs(char ** str);
void okill();
void redirect(char* parts[], int count, char* home, char *hist[], int current);
void functions(char* parts[], int index, int background, char* home, char *hist[], int current);
void sigstp_handler();
void sigint_handler(int sig);
const char* get_process_name_by_pid(const int pid);
void init();
int proc_comp(const void *a, const void *b);
void cd(char *home, char **argarr, int count);
void history(char *hist[], int current, char **argarr, int count);
void ls(char* home, char *parts[], int index);
void lcmd(char *directory, char *filename);
int nightswatch(char **parts, int count);
void pinfo(char *home, char **argarr, int cnt);