bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Equivalent of ksh, zsh {N}<[WORD] ?


From: R. Bernstein
Subject: Re: Equivalent of ksh, zsh {N}<[WORD] ?
Date: Tue, 26 Aug 2008 15:34:07 -0400

Chet Ramey writes:
 > R. Bernstein wrote:
 > 
 > > Right now what bashdb assumes that file descriptors 4 through 9 are
 > > free, but it really has no right to assume that. And in fact, GNU
 > > autoconf configure will use file descriptors in this range. Also using
 > > 4-9 we is pretty limited in in file descriptors. This is less of an
 > > issue, but still annoying and arbitrarily restrictive.
 > 
 > Why do you limit yourself to file descriptors 4-9?  Bash doesn't restrict
 > you to single-digit fds.  I know there have been close-on-exec problems
 > with fds > 10 in the past, but those should be fixed.

bashref.texi says this:

  Redirections using file descriptors greater than 9 should be used with
  care, as they may conflict with file descriptors the shell uses
  internally.

I'm not sure I what this means. What "care" is supposed to be used?
How do I find out what file descriptors bash has used internally, what
from a debugger's standpoint the debugged program has opened, and
what's free for me to use and how I can register that?  Not knowing
this, the safest thing here seems to be to avoid file descriptors over
9 altogether.

Please feel free to clarify or elaborate on the cited
paragraph. Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]