[BusyBox] Changing from ramdisk to ramfs: nothing but busybox
Matt Kraai
kraai at alumni.carnegiemellon.edu
Tue Jun 5 10:51:24 UTC 2001
On Tue, Jun 05, 2001 at 09:13:37AM -0700, Larry Doolittle wrote:
> Vadim Berkgaut asserted:
>
> # First, busybox shell
> # (both hush and lash) cannot cope with "exec chroot . /sbin/init <dev/console
> # >dev/console 2>&1".
>
> Well, hush is supposed to handle that. You have found a
> real-life bug, that I will address when I get the chance.
>
> echo foo >bar
> cat bar
> echo replacement >bar 2>&1
> cat bar
>
> should rightfully spit out "replacement" for the second cat.
> It does under bash/ash, but hush clearly bungles the 2>&1,
> because the file bar ends up empty.
I just checked in a patch to fix this. The problem was that we
were closing the original file descriptor (in this case standard
output). We now only close the file descriptors for files we just
opened.
Matt
More information about the busybox
mailing list