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

Re: PATCH: ztcp

On Sep 9,  6:01pm, Clint Adams wrote:
} I don't understand what fd duplication buys you.

It lets you choose a specific fd to which to assign the descriptor, rather
than having to take whatever you get.  In POSIX emulation mode, fds > 9
can't [*] be redirected to/from, so it's important to be able to specify
a known-free number.

[*] Actually, it does work, but it's a bug in zsh's POSIX emulation and
shouldn't be relied upon.

Incidentally, I did mention your objection to /dev/tcp/portname on the
shell mailing list, but the response was that several unix variants have
already implemented /dev/tcp/* as special files, so the shell would only
be emulating that interface on platforms that don't support it, much as
zsh already does with /dev/fd/.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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