From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Test issues
Date: Tue, 11 Jul 2006 09:23:33 -0700 [thread overview]
Message-ID: <060711092333.ZM17490@torch.brasslantern.com> (raw)
In-Reply-To: <200607111530.k6BFU0mG023293@news01.csr.com>
On Jul 11, 4:29pm, Peter Stephenson wrote:
}
} + myfd=
} exec {myfd}>logfile
} - print This is my logfile. >&$myfd
} - print Examining contents of logfile...
} - cat logfile
} + if [[ -z $myfd ]]; then
} + print "Ooops, failed to set myfd to a file descriptor." >&2
That's not going to help. The problem is that if {mytfd} is not
recognized as a file descriptor, it's taken as a command, and the
"exec" causes the test script to replace itself with nothing (and
effectively exit).
The real solution is to put the entire thing in a subshell, I think.
next prev parent reply other threads:[~2006-07-11 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 14:49 Vin Shelton
2006-07-11 15:29 ` Peter Stephenson
2006-07-11 16:23 ` Bart Schaefer [this message]
2006-07-12 11:48 ` Peter Stephenson
2006-07-13 9:37 ` Bart Schaefer
2006-07-11 15:34 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=060711092333.ZM17490@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).