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

Re: Possible Solaris problem in 'checkout_entry()'

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:23


On Mon, 17 Mar 2008, Morten Welinder wrote:
quoted
                unlink(path);
And checking the result from unlink might not hurt either.
Well, that part is actually intentional. We simply don't care. If the 
unlink succeeds, we're happy, if it fails, we're happy. No reason to test, 
really.

(Well, it's not that we're "happy" if the unlink fails, but we actually 
_expect_ it to fail for directories, and regardless of that we're really 
doing the _real_ error handling later when we actually create the new 
entry that will replace the old one, so we don't much care at unlink 
time).

IOW, the real "checking" is taking place in "create_file()", so if the 
unlinking failed (due to a read-only directory or something), that's where 
we'll do the proper error reporting.

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