On Thu, Jan 05, 2017 at 10:00:33AM +0100, Martin Liška wrote:
> Having '-' used as indication that input should be taken from standard input
> is unfriendly to pch which calculates md5sum of all input file descriptors.
> With that fdopen fails for STDIN_FILENO. To be honest my patch is just a 
> workaround
> for the ICE. Is there a better solution for that?

Shouldn't we just error on trying to create PCH for - ?
I mean, how are you going to use such a PCH file?  ./- is something
different from - .

If it makes some sense (I don't see it), then the question is if the stdin
is seakable or not.  If it is not seakable, don't we reject it already, or
aren't there other places where we want to seek on it?
If it is seakable, then you might e.g. just read it into a buffer in a loop
and md5sum the buffer instead of md5summing the stream.

        Jakub

Reply via email to