[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#57726: mv from busybox enters an endless loop



>>>>> "Santiago" == Santiago Vila <sanvila@unex.es> writes:

    Santiago> Package: boot-floppies
    Santiago> Version: 2.2.6-2000-02-07
    Santiago> Severity: important

    Santiago> The "mv" command still behaves strangely: As in Bug #56478, I rename
    Santiago> root.bin as root.bin.gz, gunzip it and mount it under /mnt. Then I try:

    Santiago> cd /tmp
    Santiago> mkdir foo
    Santiago> cd foo
    Santiago> mkdir a
    Santiago> touch b
    Santiago> /mnt/bin/mv * a

    Santiago> and this makes `mv' to enter in an endless loop.

 Hahah... of course it does.  Try this:

 cd /tmp; mkdir foo; cd foo; mkdir a; touch b;
 echo /usr/bin/anything * a

 You'll see something like this:

   karlheg@bittersweet:/tmp/foo
   % echo /usr/bin/anything * a
   /usr/bin/anything a b a

 Note that it's trying to mv a into a.

   karlheg@bittersweet:/tmp/foo
   % mv --version
   mv (GNU fileutils) 4.0l
   Written by Mike Parker, David MacKenzie, and Jim Meyering.
   
   Copyright (C) 1999 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   karlheg@bittersweet:/tmp/foo
   % mv * a
   mv: cannot move `a' to a subdirectory of itself, `a/a'
   Exit Status: [0]
   karlheg@bittersweet:/tmp/foo
   % ls -lR
   .:
   total 4
   drwxrwxr-x    2 karlheg  karlheg      4096 Feb 10 19:31 a
   
   ./a:
   total 0
   -rw-rw-r--    1 karlheg  karlheg         0 Feb 10 19:29 b

    Santiago> When I stop it by pressing Control+C, I have an `a' directory containing
    Santiago> an `a' directory, containing an `a' directory, containing an `a'
    Santiago> directory, containing an `a' directory...

    Santiago> I think this bug should be fixed before release.

 I will fix this tonight.


Reply to: