zsh-workers
 help / color / mirror / code / Atom feed
* Maximum of 9 file descriptors
@ 2015-07-23 17:47 JD Ballard
  2015-07-23 22:49 ` Bart Schaefer
  2015-07-24 22:40 ` Vincent Lefevre
  0 siblings, 2 replies; 3+ messages in thread
From: JD Ballard @ 2015-07-23 17:47 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Is there a reason why file descriptors are maxed out at 9?

    $ zsh
    $ cat 9>/tmp/foo # works
    $ cat 10>/tmp/foo # error

With Bash, this isn't the case.

    $ bash
    $ cat 9>/tmp/foo # works
    $ cat 10>/tmp/foo # also works

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Maximum of 9 file descriptors
  2015-07-23 17:47 Maximum of 9 file descriptors JD Ballard
@ 2015-07-23 22:49 ` Bart Schaefer
  2015-07-24 22:40 ` Vincent Lefevre
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2015-07-23 22:49 UTC (permalink / raw)
  To: JD Ballard; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

On Thu, Jul 23, 2015 at 10:47 AM, JD Ballard <i.am.qix@gmail.com> wrote:
> Is there a reason why file descriptors are maxed out at 9?

It's not a descriptor limitation, it's a syntax limitation. The syntax for
">" permits only a single digit to the left.

You can work around it this way:

$ fd=10
$ cat {fd}>/tmp/foo

Although FDs 10,11,12 tend to be used a lot by the shell internally.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Maximum of 9 file descriptors
  2015-07-23 17:47 Maximum of 9 file descriptors JD Ballard
  2015-07-23 22:49 ` Bart Schaefer
@ 2015-07-24 22:40 ` Vincent Lefevre
  1 sibling, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 2015-07-24 22:40 UTC (permalink / raw)
  To: JD Ballard; +Cc: zsh-workers

On 2015-07-23 17:47:36 +0000, JD Ballard wrote:
> Is there a reason why file descriptors are maxed out at 9?

FYI, I started a discussion "multi-digit file descriptors"
a few months ago:

  http://www.zsh.org/mla/users/2015/msg00211.html

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-24 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 17:47 Maximum of 9 file descriptors JD Ballard
2015-07-23 22:49 ` Bart Schaefer
2015-07-24 22:40 ` Vincent Lefevre

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).