On Wed, Nov 28, 2018 at 02:27:08PM +0100, SZEDER Gábor wrote: > > Curiously, the act.err file also has 54 NUL bytes before the "fatal:" > > message. > > I think those NUL bytes come from the file system. > > The contents of 'act.err' from the previous test ('fetch gzipped > empty') is usually: > > fatal: request ended in the middle of the gzip stream > fatal: the remote end hung up unexpectedly > > Notice that the length of the first line is 54 bytes (including the > trailing newline). So I suspect that the following is happening: > > - http-backend in the previous test writes the first line, > - that test finishes and this one starts, > - this test truncates 'act.err', > - and then the still-running http-backend from the previous test > finally writes the second line. > > So at this point 'act.err' is empty, but the offset of the fd of the > redirection still open from the previous test is at 54, so the file > system fills those bytes with NULs. Right, good thinking. Thanks for the explanation! -Peff