On 01/11/18 07:39, Kamil Dudka wrote: > On Tuesday, September 11, 2018 3:05:20 PM CET Kamil Dudka wrote: >> 'tee' expected the output file descriptors to operate in blocking mode >> but this assumption might be invalidated by other programs connected to >> the same terminal, as in the following example: >> >> $ telnet ... | tee log_file >> >> telnet calls ioctl(stdin, FIONBIO, [1]), which causes the O_NONBLOCK >> flag to be set on tee's output, which is connected to the same terminal. >> >> This patch has zero impact unless EAGAIN returns from fwrite/fclose(). >> In that case 'tee' waits for the underlying file descriptor to become >> writable again and then it writes the remaining data. > > Are there still any concerns about the last version of this patch? > > Is there anything I can do to move this forward?
I still don't see why tee is special here, compared to any other filter. The infinite timeout poll() also worries me. There were also the 4 other possible options I mentioned in the thread for avoiding the issue. I'm not too enthusiastic for this one, sorry. Pádraig
