@@ -162,8 +162,8 @@ struct process_t {
162
162
// The 0-based index of this process. The 0-th process is the main process.
163
163
size_t index;
164
164
165
- fd_t stdout = -1 ; // FD of where the stdout is redirected to.
166
- fd_t stdin = -1 ; // FD of where the stdin is coming from.
165
+ fd_t stdout_fd = -1 ; // FD of where the stdout is redirected to.
166
+ fd_t stdin_fd = -1 ; // FD of where the stdin is coming from.
167
167
168
168
// If the proxy is active (i.e. -o is provided), these are the file
169
169
// descriptors for its communication.
@@ -231,7 +231,7 @@ struct process_t {
231
231
232
232
// Fork and exec the child process, redirecting its standard I/O.
233
233
void spawn () {
234
- fd_t stdio[3 ] = {stdin, stdout , FDREDIR_NONE};
234
+ fd_t stdio[3 ] = {stdin_fd, stdout_fd , FDREDIR_NONE};
235
235
236
236
vector<const char *> argv (args.size ());
237
237
for (size_t i = 0 ; i < args.size (); i++) {
@@ -244,8 +244,8 @@ struct process_t {
244
244
logmsg (LOG_DEBUG, " started #%ld, pid %d" , index, pid);
245
245
// Do not leak these file descriptors, otherwise we cannot detect if the
246
246
// process has closed stdout.
247
- close (stdin );
248
- close (stdout );
247
+ close (stdin_fd );
248
+ close (stdout_fd );
249
249
}
250
250
251
251
// Function called when the process exits.
@@ -641,22 +641,22 @@ struct state_t {
641
641
tie (read_end, write_end) = make_pipe ();
642
642
logmsg (LOG_DEBUG, " setting up pipe #%ld (fd %d) -> proxy (fd %d)" , i,
643
643
write_end, read_end);
644
- process.stdout = write_end;
644
+ process.stdout_fd = write_end;
645
645
process.process_to_proxy = read_end;
646
646
set_non_blocking (process.process_to_proxy );
647
647
648
648
tie (read_end, write_end) = make_pipe ();
649
649
logmsg (LOG_DEBUG, " setting up pipe proxy (fd %d) -> #%ld (fd %d)" ,
650
650
write_end, j, read_end);
651
651
other.proxy_to_process = write_end;
652
- other.stdin = read_end;
652
+ other.stdin_fd = read_end;
653
653
} else {
654
654
// No proxy: direct communication.
655
655
tie (read_end, write_end) = make_pipe ();
656
656
logmsg (LOG_DEBUG, " setting up pipe #%ld (fd %d) -> #%ld (fd %d)" , i,
657
657
write_end, j, read_end);
658
- process.stdout = write_end;
659
- other.stdin = read_end;
658
+ process.stdout_fd = write_end;
659
+ other.stdin_fd = read_end;
660
660
}
661
661
}
662
662
}
0 commit comments