seq_main() bugs

Bernhard Fischer rep.nop at aon.at
Thu Apr 27 19:40:50 UTC 2006


On Thu, Apr 27, 2006 at 06:06:23PM +0100, Rob Sullivan wrote:
>These don't look like bugs, to my mind - GNU seq gives exactly the same
>output.

I may have expressed that badly. Busybox does *not* produce the output
mentioned before, which i regard a bug.

Busybox does:
$ seq 1 -1 1 ; echo ret=$?
ret=0
$ seq 1 -0 1 ; echo ret=$?
ret=0
$ seq 1 +0 1 ; echo ret=$?
ret=0

which is not the expected behaviour.

>They make sense too - for instance, seq 1 -1 1 should just print one 1, as
>there are no increments required to get from 1 to 1. The last two examples
>can never reach 1 with an infinite number of increments of size zero, so
>endlessly printing ones make sense.
>
>Rob



More information about the busybox mailing list