try to get pipes w io redir
This commit is contained in:
parent
b0b12d9fe9
commit
f05259439a
|
@ -55,7 +55,7 @@ void check_cmd_io(simple_command *cmd) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// else {
|
||||
if (cmd->infile != "") {
|
||||
cmd->infd = open(cmd->infile.c_str(), O_RDONLY);
|
||||
if (cmd->infd < 0) {
|
||||
|
@ -81,14 +81,12 @@ void check_cmd_io(simple_command *cmd) {
|
|||
}
|
||||
}
|
||||
else cmd->outfd = 1;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// http://www.gnu.org/software/libc/manual/html_node/Wordexp-Example.html
|
||||
int expand_and_execute (simple_command *cmd) {
|
||||
const char *program = cmd->vargs[0].c_str();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
|
||||
// method definitions
|
||||
void ctrlCHandler(int sig);
|
||||
vector<string> split(const char *str, char c = ' ');
|
||||
|
@ -17,4 +18,5 @@ void check_cmd_io(simple_command *cmd);
|
|||
int expand_and_execute (simple_command *cmd);
|
||||
bool remap_pipe_stdin_stdout(int rpipe, int wpipe);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue