-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hexyl /dev/zero
hangs
#200
Comments
What do you expect the behavior to be in this instance? |
Anything but empty output, which makes it impossible to tell if anything is happening at all.
dd if=/dev/zero count=5000B | hexyl outputs
so it would be cool if hexyl /dev/zero printed
and then hanged. So yeah, basically just flushing the output after the |
Agreed. This is also what Thank you for reporting this. |
Great, I'll look into fixing this today. |
It looks like the issue is a simple one-liner: the write buffer isn't flushed until the very end of output. I wrote it this way initially to mitigate performance issues from flushing the buffer, but benchmarks show that the effect is negligible. I've added a line that will flush after every line. |
Thank you very much for looking into this! Any chance you could share those benchmark results? I also would have expected repeated flush calls for every line to be performance-relevant. |
So does
hexyl < /dev/zero
or
cat /dev/zero | hexyl
I guess it has to do with hexyl's feature where it skips null rows and prints only the first and the last.
The text was updated successfully, but these errors were encountered: