Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Odd behavior using MULTIOS



Ok.  Well I got the same result on 4.3.17 on HP-UX 11.31 and 5.5.1 on Centos Linux 8.  So if it's a bug, it's been there a while.

Although my original use case was to create a file descriptor that printed both to stderr and a log file, where simple messages would be printed to both while more details could be sent to the logfile without doubling the print statements for the simple messages. So the ordering problem I initially posted about would affect this use case as well, making it, for me at least, moot.

On 11/11/2020 11:25 AM, Peter Stephenson wrote:
On 11 November 2020 at 17:11 Clinton Bunch <cdbunch@xxxxxxxxxxx> wrote:
Another thing I noticed is that MULTIOS doesn't appear to work with exec

i.e.

exec 3>/tmp/test1 3>/tmp/test2

causes the script to hang.

I'm not sure why.  Am I just being dense today?
That sounds like a real bug.  The implementation is going to be a little
different for this case, indeed we effectively get a coprocess so anyone
fixing it may have their work cut out, but I'm not aware of any actual
expectation that it doesn't work, and certainly not that it hangs.

pws





Messages sorted by: Reverse Date, Date, Thread, Author