[BusyBox] small fix for tail

Glenn McGrath bug1 at iinet.net.au
Thu Sep 30 00:27:40 UTC 2004


On Wed, 29 Sep 2004 14:58:32 -0400
William Barsse <wbarsse at pfn.com> wrote:

> Hi,
> 
> When I run 'tail' on more than one file I get a SIGSEGV, this seems to
> 
> be due to some variables not being reinitialized when from the first 
> files to the next.

Thanks, ive checked in your patch.

What options were you using to get the segfault ?

The bug i see it fix is the following

Before patch
$ ./busybox tail -n 2 AUTHORS TODO
==> AUTHORS <==
    devfsd and size optimizations in strings, openvt, chvt, deallocvt,
hdparm and fdformat.


==> TODO <==
$

After patch
$ ./busybox tail -n 2 AUTHORS TODO
==> AUTHORS <==
    devfsd and size optimizations in strings, openvt, chvt, deallocvt,
hdparm and fdformat.


==> TODO <==
----

$

Note the first example didnt have any lines under TODO.



Glenn



More information about the busybox mailing list