svn commit: r284198 - head/bin/ls

Alexander Kabaev kabaev at gmail.com
Sat Jun 13 01:13:44 UTC 2015


On Fri, 12 Jun 2015 20:43:09 -0400
Alexander Kabaev <kabaev at gmail.com> wrote:

> On Wed, 10 Jun 2015 01:27:39 +0000 (UTC)
> Marcel Moolenaar <marcel at 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 <phil at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20150612/76570bc7/attachment.sig>


More information about the svn-src-all mailing list