Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Sebastian Benoit
as jca@ says, the clearerr() should be out of the loop, so ok benno@ too. J??r??mie Courr??ges-Anglas(j...@wxcvbn.org) on 2015.12.29 19:18:55 +0100: > "Todd C. Miller" writes: > > > On Tue, 29 Dec 2015 13:25:16 +0100, > > =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- > > Anglas?= wrote: > > > >>

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Jérémie Courrèges-Anglas
"Todd C. Miller" writes: > On Tue, 29 Dec 2015 13:25:16 +0100, > =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- > Anglas?= wrote: > >> I think it makes sense to try to recover, so calling clearerr() is >> needed. But as said by millert you can't rely on fprintf to set the >> error indicator; the w

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Todd C. Miller
On Tue, 29 Dec 2015 13:25:16 +0100, =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- Anglas?= wrote: > I think it makes sense to try to recover, so calling clearerr() is > needed. But as said by millert you can't rely on fprintf to set the > error indicator; the write might not be committed to disk, a

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Jérémie Courrèges-Anglas
Sebastian Benoit writes: > Todd C. Miller(todd.mil...@courtesan.com) on 2015.12.28 10:46:08 -0700: >> On Fri, 25 Dec 2015 00:30:29 +0100, Ingo Schwarze wrote: >> >> > Besides, i don't see the point in messing with FILE flags at all >> > in case of encoding errors. As opposed to fgetwc(3) and fp

ferror in ntpd (Re: bugs in printf(3))

2015-12-28 Thread Sebastian Benoit
Todd C. Miller(todd.mil...@courtesan.com) on 2015.12.28 10:46:08 -0700: > On Fri, 25 Dec 2015 00:30:29 +0100, Ingo Schwarze wrote: > > > Besides, i don't see the point in messing with FILE flags at all > > in case of encoding errors. As opposed to fgetwc(3) and fputwc(3), > > the manual doesn't d