Sticky EOF breaks stream concatenation via dup2 [BZ #23636]

Adam Sampson ats@offog.org
Mon Sep 17 15:38:00 GMT 2018


Rich Felker <dalias@libc.org> writes:

>> Do you have any visibility into the ports tree to see how many
>> other patches add clearerr(.*);?

Looking at:
https://github.com/freebsd/freebsd-ports/search?q=clearerr

The only other patch adding a call to clearerr is in colortail, and
looking at the original code, that doesn't seem to be the same kind of
problem since it's not replacing the fd:
https://github.com/joakim666/colortail/blob/master/TailFile.cc#L385

> Maybe getting a bit off-topic, but something is really wrong with FOSS
> processes of getting fixes upstream if FreeBSD ports had this trivial
> fix since 2015 and it didn't make it upstream.

Well, maybe, but it's quite possible that the port author didn't realise
it was a general bugfix (rather than a FreeBSD-specific thing); I've
certainly made the same mistake when writing ports in the past!

Cheers,

-- 
Adam Sampson <ats@offog.org>                         <http://offog.org/>



More information about the Libc-alpha mailing list