Re: Truncated output when writing to a pipe using sendfile

2022-05-07 Thread Gianni Ceccarelli
On 2022-05-07 Filips R wrote: > Looks like the sendfile call comes from cache.c:95 - > https://git.zx2c4.com/cgit/tree/cache.c?h=v1.2.3=55fa25adb097d2681607d8b0f51a0c393cc9af1a#n95 > > senfile(2) says that a successful call may write fewer bytes than > requested; the caller should be prepared to

Truncated output when writing to a pipe using sendfile

2022-05-07 Thread Filips R
Hello! I've been investigating an issue on my Alpine linux server running cgit 1.2.3-r2. When I call the CGI program and redirect to a regular file (or just output to tty), the output is correct, however if the standard output is a pipe, the output is truncated at 65523 bytes. Here is the end of