-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.h
37 lines (29 loc) · 885 Bytes
/
run.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
/*
Pitágoras Alves & André Winston, UFRN, March 2017.
string run(const char * command):
command Shell command to be executed by linux;
returns A string with all of the output generated by the command
string run(string command):
same as above
void runWhileSilent(vector<string> commands):
commands Vector of commands to be executed in sequence. If one of the commands
outputs anything, the commands after him will be canceled.
*/
#ifndef _RUN_
#define _RUN_
#include <iostream>
#include <stdexcept>
#include <stdio.h>
#include <string>
#include <unistd.h>
#include <set>
#include <signal.h>
#include <vector>
using namespace std;
void runWhileSilent(vector<string> commands);
string run(string command);
string run(const char* command);
void runWhileSilent(vector<string> commands);
string run(string command);
string run(const char* command);
#endif