The write function writes 4 extra bytes containing random values to the fd. Most of the times, the first of theses values is 0 witch doesn't cause issues with most implementation of gnl, but the result can be considered a binary file. In that case, the test is broken since reading from a binary files is an undefined behavior.
The write function writes 4 extra bytes containing random values to the fd. Most of the times, the first of theses values is 0 witch doesn't cause issues with most implementation of gnl, but the result can be considered a binary file. In that case, the test is broken since reading from a binary files is an undefined behavior.