-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
34 lines (26 loc) · 952 Bytes
/
shell.h
File metadata and controls
34 lines (26 loc) · 952 Bytes
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
#ifndef UNIX_SHELL_SHELL_H
#define UNIX_SHELL_SHELL_H
#include <fcntl.h>
#include <limits.h>
#include "jobs.h"
#include "signals.h"
#include "promptline.h"
#define READ_LINE_SIZE 1024
#ifndef HOST_NAME_MAX
# define HOST_NAME_MAX 64
#endif
#ifndef LOGIN_NAME_MAX
# define LOGIN_NAME_MAX 256
#endif
command cmds[MAXCMDS]; /* current set of parsed commands from line */
char *infile, *outfile, *appfile; /* files for redirect streams of new job */
job* current_job; /* current foreground working job */
int bkgrnd; /* flag for the process in the background */
int invite_mode; /* flag for waiting for input from the terminal.
Used in SIGCHLD handler and do_job_notification() */
pid_t shell_pgid; /* shell process group ID */
struct termios shell_tmodes; /* saved attributes of shell terminal */
int shell_terminal; /* descriptor of shell STDIN */
/* Exit from shell. */
void shell_exit(int stat);
#endif