[Bug 11441] xargs: fails with "argument line too long"

bugzilla at busybox.net bugzilla at busybox.net
Wed Oct 31 20:53:05 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=11441

--- Comment #2 from Steffen Nurpmeso <steffen at sdaoden.eu> ---
Sigh, my mail did not get through?  Copy and pasting the content, please wait:

Hmm, the backup script does

   sub call{
      unless(open HOOK, "| $HOOK " . ($COMPLETE || $RESET) .
            " $^O >>$MFFN 2>&1"){
         ::err(1, "Failed to create hook pipe: $^E");
         ::do_exit(1)
      }else{
         my ($stop, $listref) = (0, Filelist::get_listref());
         local *hdl = sub{ $stop = 1 };
         local $SIG{PIPE} = \&hdl;
         foreach my $p (@$listref){
            last if $stop;
            $p =~ s/\"/\"\\\"\"/g;
            $p = '"' . $p . '"';
            print HOOK $p, "\n"
         }
      }
      close HOOK;

      seek $MFFH, 0, 2
   }

where $HOOK is an executable shell script.
The $HOOK then does (later on)

  xargs tar -v -r -f "${HOME}/traffic/${backup}.tar" || {
     rm -f "${HOME}/traffic/${backup}.tar"
     echo >&2 'Failed 11'
     exit 11
  }

and that does exit 11.  The "listref" above is an array of
absolute path names, and i did change the "print HOOK" to echo
some words first, and whereas the GNU xargs printed that three
times, the busybox one only once.

(And sorry for the late response, i have a new box and then
changed the old Apple box to native Linux, which turns out to be
very difficult for an inexperienced, and would plain fail without
the ArchLinux wiki -- thanks for that, whoever you are.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list