Thanks, fix is working for me
Did some testing and my (old) scripts still work :)
I still do have one suggestion about the platform.h
I would suggest to change the comment about the EXTRA_CFLAGS="-DBB_NOMMU"
Or implement the flag (now its confusing)
I also did made one small modification but I dont want to call this a patch
because its possible its a bug on something else
If I do a:
ls -l /proc/*/fd/
Then I see some files descriptors holding some files open
in my case I cant dismount my /hdd anymore so for me this is a problem
the way to prevent this is to insert the following line inside the hush.c
if (argv[optind] == NULL) {
opt = parse_and_run_file(stdin);
} else {
debug_printf("\nrunning script '%s'\n", argv[optind]);
global_argv = argv + optind;
global_argc = argc - optind;
input = xfopen(argv[optind], "r");
fcntl(fileno(input), F_SETFD,FD_CLOEXEC);
<<<<<<<<<<<<<<<<<<< this
line I did insert
opt = parse_and_run_file(input);
}
and now the problem is solved
p.s. this fd problem was already there in the old versions so this is not
related to your latest mods. I am using a hush script to start all kind of
stuff on a dvd player so thats probably the reason Im the first one to
notice this fd problem ?
> -----Oorspronkelijk bericht-----
> Van: Denys Vlasenko [mailto:[EMAIL PROTECTED]
> Verzonden: zondag 10 februari 2008 13:16
> Aan: [email protected]
> CC: Martinb_ARM_NOMMU_KISSDVD; Ryan Raasch
> Onderwerp: Re: variable assignment / command substitution
>
>
> On Tuesday 15 January 2008 21:35, Martinb_ARM_NOMMU_KISSDVD wrote:
> > Same problem for me
> > I was thinking it was related to hush
> > i did made a post to vda but i did not post to the list because
> i was not
> > sure its a real bug
>
> Not really, I'm sure it really happens on NOMMU.
>
> > I wil paste my message again to the list and i hope someone is
> able to fix
> > this
> > (this does break all my scripting so i still cant use the 1.9.0 hush)
> >
> > /paste
> > if i have the folowing script:
> > #!/bin/hush
> > export TVOFF=`echo hallo`
> > echo $TVOFF
>
> On 1.9.0, it will not work. Command substituton is simply disabled
> for NOMMU in 1.9.0:
>
> #if !BB_MMU
> /* A bit drastic. Can allow some simpler commands
> * by analysing command in generate_stream_from_list()
> */
> #undef ENABLE_HUSH_TICK
> #define ENABLE_HUSH_TICK 0
> #endif
>
> Since it seems to be a bit drastic indeed, I paln to enable it again.
> However, note that it will be a dangerous thing to use.
> I added an explanation in comments in hush.c.
>
> Martin, if you want to try the fix, apply this patch and then
> replace hush.c with attached one.
> --
> vda
>
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox