-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc.hpp
More file actions
17 lines (17 loc) · 775 Bytes
/
Copy pathfunc.hpp
File metadata and controls
17 lines (17 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// this is the header for my function file
#pragma once
#include <vector>
#include <chrono>
#include <ctime>
#include <sys/wait.h>
#include <iostream>
#include <unistd.h>
const int WRITE = 1;
const int READ = 0;
std::vector<std::string> tokenize(std::string cmd);
void printHistory(std::vector<std::string> history);
void printHistory(std::vector<std::string> history, std::vector<std::string> tokenCmd);
std::chrono::duration<double> forkExec(std::vector<std::string> tokenCmd, std::chrono::duration<double> ptime);
std::chrono::duration<double> pipeForkExec(std::vector<std::string> tokenCmdL, std::vector<std::string> tokenCmdR,std::chrono::duration<double> ptime);
bool check4Pipe(std::vector<std::string> tokenCmd);
int getPipeIndex(std::vector<std::string> tokenCmd);