--- bash-3.0.old/jobs.c +++ bash-3.0/jobs.c @@ -437,8 +437,15 @@ #if defined (PGRP_PIPE) if (job_control) { + int fd; if (pipe (pgrp_pipe) == -1) sys_error ("start_pipeline: pgrp pipe"); + if ((fd = fcntl(pgrp_pipe[0], F_DUPFD, 10)) == -1 || close(pgrp_pipe[0]) == -1) + sys_error ("start_pipeline: pgrp pipe"); + pgrp_pipe[0] = fd; + if ((fd = fcntl(pgrp_pipe[1], F_DUPFD, 10)) == -1 || close(pgrp_pipe[1]) == -1) + sys_error ("start_pipeline: pgrp pipe"); + pgrp_pipe[1] = fd; } #endif }