On 05/03/2018 06:40 PM, enh wrote:
> +    // If we're working on stdin, copy to a temporary file and then use
> +    // an fd for that file. That way the rest of the code doesn't have to
> +    // worry about non-seekable/non-mmap'able input.

Hmmm, in the old code:

$ ./file ../filesystems.tar.gz
../filesystems.tar.gz: gzip compressed data
$ ./file - < ../filesystems.tar.gz
-: gzip compressed data
$ file /dev/zero
/dev/zero: character special
$ file - < /dev/zero
/dev/stdin: data

That's inconsistent about /dev/zero, not sure why.

But if we copy /dev/zero to a temp file we'll fill the hard drive...

Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to