On Fri, 12 Jun 2015 20:43:09 -0400 Alexander Kabaev <kab...@gmail.com> wrote:
> On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) > Marcel Moolenaar <mar...@freebsd.org> wrote: > > > Author: marcel > > Date: Wed Jun 10 01:27:38 2015 > > New Revision: 284198 > > URL: https://svnweb.freebsd.org/changeset/base/284198 > > > > Log: > > Convert ls(1) to use libxo(3). > > > > Obtained from: Phil Shafer <p...@juniper.net> > > Sponsored by: Juniper Networks, Inc. > > > <SKIP> > > This broke all code that pipes output of the ls command to pipeline, > such as 'ls | wc -l'. ls never exits and never output anything. Is > there any purpose to libxo other than breaking stuff, which it > achieves so splendidly? > Just to clarify, this happens because libxo cannot display file names in encodings current locate cannot handle. xo_format_string_direct function then spins indefinitely trying to call xo_failure(xop, "invalid mbs char: %02hhx", *cp) over and over, which, of course, produces nothing and does not advance the cp pointer either, resulting in apparent ls hang. -- Alexander Kabaev
pgpsCryaneAL4.pgp
Description: OpenPGP digital signature