Thread (1 message) 1 message, 1 author, 2024-06-07

Re: [PATCH 2/2] server-info.c: remove temporary info files on exit

From: Junio C Hamano <hidden>
Date: 2024-06-07 21:49:06

Taylor Blau [off-list ref] writes:
quoted
We no longer do so.  We later call rename_tempfile() to close the
underlying file descriptor and move the temporary file to its final
place, but I do not see what guarantee we have that we do not lose
what we had buffered in the stdio with the updated code.
rename_tempfile() first calls close_tempfile_gently() before calling
rename(). close_tempfile_gently() calls fclose() on temp->fp before
returns, so we get our fflush() call implicitly there.
OK.  I didn't see that fclose().  Then we are safe.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help