On Sunday 21 August 2011 12:24, Dennis Groenen wrote:
> On 08/18/2011 03:12 PM, Dennis Groenen wrote:
> > There is, however, one (major) blocker with my patch. For some reason,
> > both the conditions "G.line_input_state->flags&  SAVE_HISTORY" and
> > "G.line_input_state->hist_file" are true in hush when hush is not being
> > ran as an interactive shell (e.g. hush -c "echo hello"). Saving shell
> > history upon shell exit then will of course cause hush to segfault. Is
> > there a bug in hush causing those conditions to be true, or am I
> > overlooking something (in hush_exit())? This problem does not occur in
> > ash, which shares most of its history handling code with hush. Any input
> > on this is highly appreciated.
> > --Dennis
> 
> I've attached a patch that simply unsets the SAVE_HISTORY flag early in 
> hush_main(), and re-sets it at the point hush gets interactive. This 
> fixes the blocker quoted above.

Applied with some changes.
Please test current git.

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to