[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/44950: fcntl(F_MAXFD) returns bogus values
On Sun, May 15, 2011 at 06:11:05PM +0000, Christos Zoulas wrote:
> In article <20110514133340.GC12503%snowdrop.l8s.co.uk@localhost>,
> David Laight <david%l8s.co.uk@localhost> wrote:
> >On Wed, May 11, 2011 at 12:55:01PM +0000, Christos Zoulas wrote:
> >> .... Note that
> >> you cannot depend on what file descriptors the shell may have open. Just
> >> to
> >> give an example, if you do an NIS operation you end up with a file
> >> descriptor
> >> open.
> >I fairly sure that the shell command line redirects have to refer to
> >file 0 through 9 in an exec'd child process - so those can't be used
> >for other purposes.
> >I did think that that the shell shouldn't really leave anything else open.
> > David
> Unfortunately it does.
> $ /bin/sh
> $ cd /proc/curproc/fd
> $ ls -l
> Rinse and repeat with different shells.
A better test would be to look at the open files of a 'sleep 9999' provess.
Is that really a bug in whatever started the shell?
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |