From b42491e3237735a9d31f6578ca4887f8be6b6742 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 20 Oct 2010 16:56:40 -0600 Subject: 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 --- ChangeLog | 6 ++++++ doc/autoconf.texi | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9217438c..34b3be42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-20 Eric Blake + + 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 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. -- cgit v1.2.1