removed output checks from data model and from implementation.

prepared to implement STD{IN,OUT,ERR} piping for subprocess execution.  Hoping to maintain compatibility with curses dialogs.
This commit is contained in:
Phanes
2017-12-01 01:13:30 -05:00
parent 3bc8908d65
commit 8545264a92
5 changed files with 32 additions and 46 deletions

View File

@@ -1,32 +1,15 @@
#ifndef FTESTS_SPROC_H
#define FTESTS_SPROC_H
#include "string"
struct ExecutionInput {
std::string executionString;
// std::string STDIN;
// std::vector<KeyValuePair> EnvironmentVariables;
};
struct Execution {
//input
ExecutionInput input;
// output
int return_code;
std::string STDOUT;
std::string STDERR;
};
#include <string>
#include <iostream>
// executes a subprocess and captures STDOUT, STDERR, and return code.
// should be able to recieve path of binary to be executed as well as any parameters
class Sproc {
public:
// call the object. returnvalue is enum representing external execution attempt not binary exit code
static int execute( ExecutionInput input, Execution & output );
static int execute( std::string input );
};
#endif //FTESTS_SPROC_H