NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/44950: fcntl(F_MAXFD) returns bogus values
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.
christos
christos
Home |
Main Index |
Thread Index |
Old Index