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

exec {_Dbg_new_fd}<>&-



In all of the terminal detection stuff I noticed that running script
bug.zsh with this contents:

exec {_Dbg_fd}<>$TTY
exec {_Dbg_fd}<>&-

prints this:
  bug.zsh:2: parse error near `&'

I think this agrees with ksh93t

However if I change the offending line to:
  exec {_Dbg_fd}<&-
  exec {_Dbg_fd}>&-

I get:


bug.zsh:3: file descriptor 12 out of range, not closed. And ksh
doesn't seem to complain.
I gather that closing _Dbg_fd for input also closes it for output.

Is this the expected or okay?

Thanks.



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