-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexec.h
62 lines (52 loc) · 1.71 KB
/
exec.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef EXEC
#define EXEC
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <signal.h>
#include "tokenlist.h"
#include "config.h"
#include "syntax.h"
void cmd_exec(token_list **t, int *status, int *conv_desc);
/*
* @function Executes command from shell
* @param **t - input token list
* @param *conv_desc - file descriptor for conveyor command input/output
* @param *status - finish status
*/
void simple_cmd_exec(token_list **t, char *command, char **argv, int *conv_desc, int *status, int *exec_status);
/*
* @function Executes commands from conveyor
* @param **t - input token list
* @param *command - command to shell
* @param **argv - arguments for shell command
* @param *conv_desc - file descriptor for conveyor command input/output
* @param *status - finish status
* @param *exec_status - execution status
*/
void conv_exec(token_list **t, int *status, int *conv_desc, int *exec_status);
/*
* @function Executes commands from conveyor
* @param **t - input token list
* @param *status - error code
* @param *conv_desc - file descriptor for conveyor command input/output
* @param *exec_status - execution status
*/
void simple_cmd(token_list **t, int *status, int *conv_desc, int *exec_status);
/*
* @function Executes commands from conveyor (stands for simple_command from grammar)
* @param **t - input token list
* @param *status - error code
* @param *conv_desc - file descriptor for conveyor command input/output
* @param *exec_status - execution status
*/
void next_cmd(token_list **t);
/*
* @function put pointer to the next command from line
* @param **t - input token list
*/
#endif // EXEC