summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-10-20 16:56:40 -0600
committerEric Blake <eblake@redhat.com>2010-10-20 17:01:19 -0600
commitb42491e3237735a9d31f6578ca4887f8be6b6742 (patch)
tree878ff1264940ba050fc02bdbae7e9175cf62ea03
parentc6b151d0e24f9670695ec6f3ef13f838ef9d05fc (diff)
downloadautoconf-b42491e3237735a9d31f6578ca4887f8be6b6742.tar.gz
docs: document dash bug in <>
* doc/autoconf.texi (File Descriptors): Dash 0.5.5 truncates on <>; at least this was fixed in dash 0.5.6. Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r--ChangeLog6
-rw-r--r--doc/autoconf.texi12
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9217438c..34b3be42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-20 Eric Blake <eblake@redhat.com>
+
+ docs: document dash bug in <>
+ * doc/autoconf.texi (File Descriptors): Dash 0.5.5 truncates on
+ <>; at least this was fixed in dash 0.5.6.
+
2010-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
tests: avoid AC_CACHE_CHECK test failure with dash.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b9570834..adbdded9 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15060,6 +15060,18 @@ $ @kbd{echo hi >&5}
bash: echo: write error: Communication error on send
@end example
+@noindent
+Furthermore, versions of @command{dash} before 0.5.6 mistakenly truncate
+regular files when using @samp{<>}:
+
+@example
+$ @kbd{echo a > file}
+$ @kbd{bash -c ': 1<>file'; cat file}
+a
+$ @kbd{dash -c ': 1<>file'; cat file}
+$ rm a
+@end example
+
When catering to old systems, don't redirect the same file descriptor
several times, as you are doomed to failure under Ultrix.