[File] Patch to fix file -n/--no-buffer

Christos Zoulas christos at zoulas.com
Sun Dec 6 14:59:01 UTC 2020


Fixed, thanks!

christos

> On Dec 6, 2020, at 8:41 AM, Charles Blake <charles.l.blake2 at gmail.com> wrote:
> 
> Attached is a patch to make, e.g.
> 
>   find . -print0|xargs -0P30 file -n|sed -n 's/: .*pie executable.*//p'
> work reliably (with a net speed-up near 30x, if you have that many cores).
> { At least reliably subject to extra conditions that no filename or type
> contains ":<SPACE>" and every answer is < atomic pipe write limit.  Both
> of these are very common cases, especially the latter and in any event
> 'file -F ::INCONceivable::' or some such can work around the former. }
> 
> Without this patch, stdout flushing only happens in "file -f fileList"
> mode which interleaves output from various kid processes of xargs.
> 
> While one can work around this with a 'stdbuf -L', that can add a
> 
> bit of overhead.  Better to just make --no-buffer work as was likely
> 
> always intended.
> 
> The patch also corrects grammar in the man page.
> 
> I tried to set up accounts on the bug tracker twice unsuccessfully.
> So, hopefully this email goes through and is enough to get in the
> patch (or some variation of the fix).
> 
> 
> <nobuffer.patch>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20201206/fedd2909/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20201206/fedd2909/attachment.asc>


More information about the File mailing list