From c69b149cb5ce6446eb267074f640e34ca726a45d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 14 Apr 2005 16:24:42 +0000 Subject: 21141: fix some issues associated with the {myfd}>... syntax --- Test/A04redirect.ztst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Test') diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index 4ed65e189..66326008f 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -248,6 +248,11 @@ >Examining contents of logfile... >This is my logfile. + setopt noclobber + exec {myfd}>logfile2 +1q:NO_CLOBBER prevents overwriting parameter with allocated fd +?(eval):2: can't clobber parameter myfd containing file descriptor $myfd + exec {myfd}>&- print This message should disappear >&$myfd 1q:Closing file descriptor using brace syntax @@ -256,7 +261,7 @@ typeset -r myfd echo This should not appear {myfd}>nologfile 1:Error opening file descriptor using readonly variable -?(eval):2: read-only variable: myfd +?(eval):2: can't allocate file descriptor to readonly parameter myfd typeset +r myfd exec {myfd}>newlogfile -- cgit 1.4.1