-
Notifications
You must be signed in to change notification settings - Fork 2
/
global.h
33 lines (26 loc) · 938 Bytes
/
global.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
#ifndef GLOBAL_H
#define GLOBAL_H
#include "mumsh.h"
#define PARENT_NORMAL 1
#define PARENT_EXIT 2
#define CHILD_NORMAL 3
char *inFileName; // input file name related with redirection
char *outFileName; // output file name related with redirection
char *line; // original input line
char *conjLine; // recombinant line
char *bgCommand[MAX_BGPROC]; // background process command
int fdStdIn; // file descriptor for stdin
int fdStdOut; // file descriptor for stdout
int nodeStatus; // current status
int lastPid[MAX_PIPED];
char *lastDir; // last directory
char *lastPendingDir; // last pending directory
const char *homedir;
#define PROC_DONE 1
#define PROC_RUNNING 2
int isBackground; // background status
int bgCnt; // current working background process; NOTE: job ID starts from 1
int bgJob[2*MAX_BGPROC]; // status Array
void promptInit();
void promptExit();
#endif