Re: fork or exec thingy.

Borislav Deianov (borislav@ensim.com)
Sat, 24 Jul 1999 20:20:22 -0700


In article <199907221351.PAA10008@morgoth.uio.no> you wrote:

> primes.sh: Can't reopen pipe to command substitution (fd 4): No
> child processes

This is strange. Here is the relevant code snippet from bash:

---8<----
FILE *istream;

istream = fdopen (fildes[0], "r");

#if defined (JOB_CONTROL) && defined (PGRP_PIPE)
close_pgrp_pipe ();
#endif /* JOB_CONTROL && PGRP_PIPE */

close (fildes[1]);

if (!istream)
{
internal_error ("Can't reopen pipe to command substitution (fd %d): %s"
,
fildes[0], strerror (errno));
goto error_exit;
}
---8<----

The call to close_pgrp_pipe just calls close a couple of times. Even
though it doesn't check for the return value of close, errno should
not contain ECHILD.

Can you try to reproduce the error while capturing the output of
strace? What are the exact versions of bash and libc? Which
distribution? (So far I cannot reproduce it.)

Borislav

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/