Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test issues
- X-seq: zsh-workers 22548
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Test issues
- Date: Tue, 11 Jul 2006 09:23:33 -0700
- In-reply-to: <200607111530.k6BFU0mG023293@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20a807210607110749q205d2d07n5b6957098a3ca5a1@xxxxxxxxxxxxxx> <200607111530.k6BFU0mG023293@xxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author