diff --git a/proc.cpp b/proc.cpp index 6d642eb66..e084f1e44 100644 --- a/proc.cpp +++ b/proc.cpp @@ -825,7 +825,7 @@ static int select_try( job_t *j ) int fd = d->param1.pipe_fd[0]; // fwprintf( stderr, L"fd %d on job %ls\n", fd, j->command ); FD_SET( fd, &fds ); - maxfd=maxi( maxfd, d->param1.pipe_fd[0] ); + maxfd = maxi(maxfd, fd); debug( 3, L"select_try on %d\n", fd ); } }