]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Mention how to silence program probes.
authorEric Blake <eblake@redhat.com>
Tue, 11 May 2010 14:00:56 +0000 (08:00 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 11 May 2010 14:02:59 +0000 (08:02 -0600)
* doc/autoconf.texi (File Descriptors): Document how to silence a
program probe.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/autoconf.texi

index 454f5aaf028403dfa04701bb8d222de69d6f0733..8b4c0f4e792b9b1c78398f006d530ded8fcd896a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-11  Eric Blake  <eblake@redhat.com>
+
+       Mention how to silence program probes.
+       * doc/autoconf.texi (File Descriptors): Document how to silence a
+       program probe.
+
 2010-04-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Error and warning message formatting cleanups.
index d6a08bc1a5c7f1a0e5483d1db83aeb8410e45ceb..28735782761657cea11a139e7f599fcb1d62d2ef 100644 (file)
@@ -14793,6 +14793,18 @@ must be done @emph{inside} the command substitution.  When running
 @samp{: `cd /zorglub` 2>/dev/null} expect the error message to
 escape, while @samp{: `cd /zorglub 2>/dev/null`} works properly.
 
+On the other hand, some shells, such as Solaris or FreeBSD
+@command{/bin/sh}, warn about missing programs before performing
+redirections.  Therefore, to silently check whether a program exists, it
+is necessary to perform redirections on a subshell:
+
+@example
+$ @kbd{/bin/sh -c 'nosuch 2>/dev/null}
+nosuch: not found
+$ @kbd{/bin/sh -c '(nosuch) 2>/dev/null}
+$ @kbd{bash -c 'nosuch 2>/dev/null'}
+@end example
+
 FreeBSD 6.2 sh may mix the trace output lines from the statements in a
 shell pipeline.