aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar Cheer Xiao <xiaqqaix@gmail.com>2012-12-21 12:46:14 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-21 15:45:35 -0800
commitd6b5558cf2932ac32ddbc6c49482761b53765c6b (patch)
tree937f05ec5a363230e255d3a5116d9e6eca5c94c6 /exec.cpp
parent50c04752f5a4e77a7d0b13d17dcdafbc81e845ff (diff)
Clean up initialization of pipe_{read,write} in exec() a bit.
Diffstat (limited to 'exec.cpp')
-rw-r--r--exec.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/exec.cpp b/exec.cpp
index 714543ea..6794fb54 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -646,16 +646,15 @@ void exec(parser_t &parser, job_t *j)
}
- pipe_read.fd=0;
- pipe_write.fd=1;
- pipe_read.io_mode=IO_PIPE;
- pipe_read.param1.pipe_fd[0] = -1;
- pipe_read.param1.pipe_fd[1] = -1;
+ pipe_read.fd = 0;
+ pipe_read.io_mode = IO_PIPE;
pipe_read.is_input = 1;
+ pipe_read.param1.pipe_fd[0] = pipe_read.param1.pipe_fd[1] = -1;
- pipe_write.io_mode=IO_PIPE;
+ pipe_write.fd = 1;
+ pipe_write.io_mode = IO_PIPE;
pipe_write.is_input = 0;
- pipe_write.param1.pipe_fd[0]=pipe_write.param1.pipe_fd[1]=-1;
+ pipe_write.param1.pipe_fd[0] = pipe_write.param1.pipe_fd[1] = -1;
j->io.push_back(&pipe_write);