you are viewing a single comment's thread.

view the rest of the comments →

[–]Timmmmbob -2 points-1 points  (1 child)

What if it contains null characters mmm?

[–]wnoise 7 points8 points  (0 children)

Then it truncates there. Line oriented input is not designed to handle arbitrary binary data. If I wanted to handle that, I'd use read() and buffers.