These are chat archives for Exa-Networks/exabgp

4th
Apr 2017
Thomas Mangin
@thomas-mangin
Apr 04 2017 17:55
Trying to figure out what you mean … @brijohn
Readline behaves differently on different OS ...
This code should be harmless if the line is not received in full, I could do better and split on \n should we get mid buffer tho ..
But I agree it should not happen
unless the data is > 4k - what I expect a normal kernel read buffer to be, as in this case it may return partial data
Brian Johnson
@brijohn
Apr 04 2017 17:59
Ah, I was looking at that and it seemed like readline would always return a full line of text, testing on linux seemed to confirm that. So it behaves differently on different platforms then?
Thomas Mangin
@thomas-mangin
Apr 04 2017 18:00
readline has subtile variations betwen unix and bsd - can not recall the exact details.
Brian Johnson
@brijohn
Apr 04 2017 18:01
This came up because that commit breaks things if the backend process dies, in which case readline returns an empty string due to an EOF condition and will then sit there in an infinite loop forever.
Thomas Mangin
@thomas-mangin
Apr 04 2017 18:01
Yes, it should handle the ‘’ condition, do you want to add it ?
please ? pretty please ?
Brian Johnson
@brijohn
Apr 04 2017 18:02
Yeah I was going to fix that, i just wasn't sure about the logic of the patch that broke things since it didn't seem to actually ever do anything.
Thomas Mangin
@thomas-mangin
Apr 04 2017 18:02
sure - I now understand.