Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH] sha1_file.c (write_sha1_from_fd): Detect close failure.

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:01

On Mon, 26 Mar 2007, Junio C Hamano wrote:
Hmph.  Not catching error from close() is wrong, so this is an
improvement, but it still leaves tmpfile on the filesystem,
doesn't it?

Looking at write_sha1_file(), which is in a sense more important
than this function, it is worse.  We should also detect error
from close(), nuke the temporary file and return an error there.
Actually, the temp file is always left there whenever there is an error 
or die() is called or CTRL_C is issued.

I don't think it is worth bothering with the removal of temp files given 
all the cases that would have to be considered, and most probably not 
exercised that often (increasing their likelihood of bing buggy).

Instead, teaching git-purge about those tmp files might be a better 
idea.


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