aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.cpp
diff options
context:
space:
mode:
authorGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-15 17:31:36 +0800
committerGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-17 15:55:05 +0800
commit00b6431ad9ec17f551b5ea175a46e5d63c181fc7 (patch)
tree831fd83134ba4dc366489e343bc8d50f4d33be4e /proc.cpp
parente020ad0c068861325dca1655cb0ed487a22b67c5 (diff)
Split out io_pipe_t, let io_buffer_t inherit it
Diffstat (limited to 'proc.cpp')
-rw-r--r--proc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/proc.cpp b/proc.cpp
index 2e6e32ee..87c8f362 100644
--- a/proc.cpp
+++ b/proc.cpp
@@ -869,10 +869,11 @@ static int select_try(job_t *j)
for (size_t idx = 0; idx < j->io.size(); idx++)
{
- const io_data_t *d = j->io.at(idx).get();
- if (d->io_mode == IO_BUFFER)
+ const io_data_t *io = j->io.at(idx).get();
+ if (io->io_mode == IO_BUFFER)
{
- int fd = d->param1.pipe_fd[0];
+ CAST_INIT(const io_pipe_t *, io_pipe, io);
+ int fd = io_pipe->pipe_fd[0];
// fwprintf( stderr, L"fd %d on job %ls\n", fd, j->command );
FD_SET(fd, &fds);
maxfd = maxi(maxfd, fd);
@@ -924,7 +925,7 @@ static void read_try(job_t *j)
char b[BUFFER_SIZE];
long l;
- l=read_blocked(buff->param1.pipe_fd[0],
+ l=read_blocked(buff->pipe_fd[0],
b, BUFFER_SIZE);
if (l==0)
{