editline icon indicating copy to clipboard operation
editline copied to clipboard

write_history silently eats IO errors in fprintf rather than failing

Open lf- opened this issue 1 year ago • 2 comments

https://github.com/troglobit/editline/blob/c50d4c34d80a051ccb381301324cd3472902b363/src/editline.c#L1619-L1634

Note that fprintf has no check on its return value so it could fail without being reported. I am unsure if the IO errors turn the FILE * into some poison that would cause the fclose() to fail, but somehow I suspect they would not.

lf- avatar May 22 '24 20:05 lf-