-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.h
46 lines (36 loc) · 775 Bytes
/
shell.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
//
// Created by glavak on 11.02.17.
//
#ifndef ASH_SHELL_H
#define ASH_SHELL_H
#define MAXARGS 256
#define MAXCMDS 50
#define MAXJOBS 128
#include <wait.h>
#include <fcntl.h>
#include <termio.h>
struct command
{
char * arguments[MAXARGS];
char is_in_piped;
char is_out_piped;
};
struct job
{
int index;
int pids[128];
int status;
struct termios tmodes;
};
void print_job_status(struct job * job);
extern struct command cmds[];
extern char * infile, * outfile, * appfile;
extern char bkgrnd;
extern struct job jobs[MAXJOBS];
extern struct job * fg_job;
extern int shell_terminal;
extern struct termios shell_tmodes;
int parseline(char *);
void kill_job(struct job * job, int sig);
size_t promptline(char *, size_t);
#endif //ASH_SHELL_H