Redirection from fd 7 in configure

Andreas Schwab schwab@linux-m68k.org
Fri Sep 4 18:03:00 GMT 2009


Eli Zaretskii <eliz@gnu.org> writes:

> What is the purpose of the following line in the GDB configure files?
>
>    exec 7<&0 </dev/null 6>&1
>
> I understand what it does, but why would the configure script want to
> do that,

>From autoconf/lib/autoconf/general.m4:

# File Descriptors
# ----------------
# Set up the file descriptors used by `configure'.
# File descriptor usage:
# 0 standard input (/dev/null)
# 1 file creation
# 2 errors and warnings
# AS_MESSAGE_LOG_FD compiler messages saved in config.log
# AS_MESSAGE_FD checking for... messages and results
# AS_ORIGINAL_STDIN_FD original standard input (still open)
#
# stdin is /dev/null because checks that run programs may
# inadvertently run interactive ones, which would stop configuration
# until someone typed an EOF.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gdb mailing list