On 10/27/2010 02:42 PM, Eric Blake wrote: > [adding bug-autoconf] > > On 10/27/2010 01:01 PM, Paul Eggert wrote: >> On 10/27/10 07:31, Christian Weisgerber wrote: >>> This produces "too many files open in shell" right away: >>> >>> ulimit -n 10; : <&- >> >> Ah, OK. Does the following output "buggy shell", then? >> >> if (ulimit -n 10; : <&-) 2>/dev/null >> then echo OK >> else echo Houston we have a problem >> fi > > I just tested on OpenBSD 4.7, FreeBSD 8.1, and MirBSD 10; that reports > failure for all three of those distros. However, it also reports > failure for dash 0.5.5.1 and latest dash.git, as well as pdksh. So the > bug is pretty much inherited by all ash derivatives. > > It passes on bash, zsh, Solaris /bin/sh, and ksh93.
Actually, bash 4.1 behaves oddly: $ bash -c 'ulimit -n 11; : <&-'; echo $? 0 $ bash -c 'ulimit -n 10; : <&-'; echo $? bash: redirection error: cannot duplicate fd: Invalid argument 0 But looking at /proc/.../fd confirms that bash is just being noisy; the fd was still successfully closed. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature