[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [1.20.0] histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2012-04-26 9:20:05
Message-ID: CAK1hOcN6ydcXtyJkwDSR8GnVQC2qrTsjQydVn1jG3VKgjmjhAQ () mail ! gmail ! com
[Download RAW message or body]

On Tue, Apr 24, 2012 at 10:40 PM, Dennis Groenen <tj.groenen@gmail.com> wrote:
> When CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is set to y, the histfile will get cleared \
> if the total amount of history lines is less than MAX_HISTORY. Only if the histfile \
> is not empty _and_ the amount of lines currently in memory are equal to or greater \
> than MAX_HISTORY, history saving will work as expected with this feature enabled. 
> Output from defconfig + CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y:
> [dennis@i7-820qm ~/busybox/a]$ echo "foo" > ~/.ash_history
> [dennis@i7-820qm ~/busybox/a]$ ./busybox ash
> ~/busybox/a $ echo "bar" > /dev/null
> ~/busybox/a $ exit
> [dennis@i7-820qm ~/busybox/a]$ cat ~/.ash_history
> [dennis@i7-820qm ~/busybox/a]$
> 
> Attached is a patch that resolves this issue. Output with the patch applied and \
> same config as above: [dennis@i7-820qm ~/busybox/b]$ echo "foo" > ~/.ash_history
> [dennis@i7-820qm ~/busybox/b]$ ./busybox ash
> ~/busybox/b $ echo "bar" > /dev/null
> ~/busybox/b $ exit
> [dennis@i7-820qm ~/busybox/b]$ cat ~/.ash_history
> foo
> echo "bar" > /dev/null
> exit
> [dennis@i7-820qm ~/busybox/b]$

Applied, thanks!
-- 
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic