# 14_io.c-fix-redirect-hang.dpatch # # DP: Description: # Revert code to wait() when a redirect has hit EOF # as there may not be an associated orphan. # DP: Author: James Troup # DP: Upstream status: Under discussion # DP: Date: 2004-11-26 --- gawk-3.1.8.old/io.c +++ gawk-3.1.8/io.c @@ -608,22 +608,6 @@ #endif /* HAVE_SOCKETS */ for (rp = red_head; rp != NULL; rp = rp->next) { -#ifndef PIPES_SIMULATED - /* - * This is an efficiency hack. We want to - * recover the process slot for dead children, - * if at all possible. Messing with signal() for - * SIGCLD leads to lots of headaches. However, if - * we've gotten EOF from a child input pipeline, it's - * good bet that the child has died. So recover it. - */ - if ((rp->flag & RED_EOF) && tree->type == Node_redirect_pipein) { - if (rp->pid != -1) - wait_any(0); - } -#endif /* PIPES_SIMULATED */ - - /* now check for a match */ if (strlen(rp->value) == tmp->stlen && memcmp(rp->value, str, tmp->stlen) == 0 && ((rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)) == tflag