GNU bug report logs -
#8846
coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Mon, 13 Jun 2011 09:17:01 UTC
Severity: normal
Tags: moreinfo
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Monday 13 June 2011, Eric Blake wrote:
>
> Not possible to portably sniff out closed fds; quoting the autoconf manual:
>
> > Don't rely on duplicating a closed file descriptor to cause an
> > error. With Solaris @command{/bin/sh}, when the redirection fails, the
> > output goes to the original file descriptor.
>
Do the shells with the close-on-exec issue also suffer of the issue with
closed fds you've reported? If not, the following could be enough to
solve our situation without having to change automake:
if (exec 3>&-; exec 4>&3) >/dev/null 2>&1; then
# Cannot determine whether a file descriptor is closed, fall back
# to inferior hack.
if test 2 -ne "$stderr_fileno_" && test ! -t "$stderr_fileno_"; then
eval "exec $stderr_fileno_>&2" # Or is `stderr_fileno_=2' enough?
fi
else
if (exec 3>&9) >/dev/null 2>&1; then
:
else
eval "exec $stderr_fileno_>&2" # Or is `stderr_fileno_=2' enough?
fi
fi
Regards,
Stefano
This bug report was last modified 13 years and 348 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.