-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnush.h
33 lines (19 loc) · 828 Bytes
/
nush.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 NUSH_H
#define NUSH_H
#include "svec.h"
#include "vec.h"
#include "cmd_queue.h"
#include "flags.h"
int execute(svec* cmd, int* input_fd);
void execute_tok(svec* tokens, flags* flgs, vec* bg_pids);
int execute_bg(svec* cmd, int* input_fd);
void execute_bg_tok(svec* tokens, flags* flgs, vec* bg_pids);
int execute_red(char op, svec* cmd, char* file, int* input_fd);
void execute_red_tok(char op, svec* tokens, char* file, flags* flgs, vec* bg_pids);
int execute_pipe(svec* cmd, int* ret, int* input_fd);
void execute_pipe_tok(svec* tokens, flags* flgs, vec* bg_pids);
int execute_tokens(svec* tokens, flags* flgs, svec* buffer, vec* bg_pids, int bg_mode);
int next_command(svec* tokens, int current_idx);
void change_input(int* input_fd);
int check_bg(vec* bg_pids);
#endif